2015-02-21 14:59:41 +00:00
|
|
|
Appname:=$(shell cat appname.txt)
|
2015-02-21 14:19:19 +00:00
|
|
|
prefix:=/usr
|
2015-03-05 15:12:47 +00:00
|
|
|
temp:=/tmp/fpm-jolla
|
2015-02-21 14:19:19 +00:00
|
|
|
sdkpath:=$(HOME)/SailfishOS
|
2015-04-27 10:56:05 +00:00
|
|
|
sourcePath:=$(shell pwd)
|
2015-02-21 15:53:25 +00:00
|
|
|
dependencies=$(shell for file in `cat dependencies.txt`;do echo "-d "$${file};done;)
|
2015-03-08 17:50:19 +00:00
|
|
|
arch:=armv7hl
|
2015-03-12 18:14:26 +00:00
|
|
|
version:=0.0.1
|
2015-04-11 13:58:30 +00:00
|
|
|
iteration:=1
|
2015-04-27 10:56:05 +00:00
|
|
|
rpmname:=$(Appname)-$(version)-$(iteration).$(arch).rpm
|
2021-05-10 18:59:52 +00:00
|
|
|
ssh_user:=defaultuser
|
|
|
|
jolla_usb_ip:=192.168.2.15
|
|
|
|
jolla_wifi_ip:=192.168.100.34
|
2015-02-21 14:19:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
all: clean build-tmp rpm-virt rpm-jolla
|
|
|
|
|
2015-04-06 23:18:17 +00:00
|
|
|
make-jolla-usb: build-tmp rpm-jolla send-jolla-usb
|
2015-02-21 14:19:19 +00:00
|
|
|
make-jolla-wifi: build-tmp rpm-jolla send-jolla-wifi
|
|
|
|
make-jolla-ap: build-tmp rpm-jolla send-jolla-ap
|
2015-03-12 18:14:26 +00:00
|
|
|
make-virt: arch:=i686
|
2015-02-21 14:19:19 +00:00
|
|
|
make-virt: build-tmp rpm-virt send-virt
|
|
|
|
|
2021-05-10 18:59:52 +00:00
|
|
|
build-tmp:
|
2015-02-21 14:19:19 +00:00
|
|
|
mkdir -p $(temp)/usr/share/applications
|
2015-04-07 01:59:49 +00:00
|
|
|
mkdir -p $(temp)/usr/share/icons/hicolor/86x86/apps
|
2015-02-21 14:19:19 +00:00
|
|
|
mkdir -p $(temp)/usr/bin
|
|
|
|
cp -ar ./qml $(temp)/usr/share/$(Appname)
|
2015-04-27 10:56:05 +00:00
|
|
|
cp -ar ./src/* $(temp)/usr/share/$(Appname)/src
|
2015-02-21 14:19:19 +00:00
|
|
|
cp ./dat/$(Appname).desktop $(temp)/usr/share/applications/
|
2015-04-07 01:59:49 +00:00
|
|
|
cp -ar ./dat/appicon.png $(temp)/usr/share/icons/hicolor/86x86/apps/$(Appname).png
|
2015-02-21 14:19:19 +00:00
|
|
|
install -m 755 ./dat/$(Appname).sh $(temp)/usr/bin/$(Appname)
|
|
|
|
|
2015-03-12 18:14:26 +00:00
|
|
|
rpm-virt: arch:=i686
|
|
|
|
rpm-virt: build-tmp
|
2015-04-27 10:56:05 +00:00
|
|
|
cd $(temp);fpm -f -s dir -t rpm \
|
|
|
|
--after-install $(sourcePath)/dat/upgradeScript.sh \
|
|
|
|
--after-remove $(sourcePath)/dat/removeScript.sh \
|
2021-05-10 18:59:52 +00:00
|
|
|
--rpm-changelog $(sourcePath)/changelog.txt \
|
2015-04-27 10:56:05 +00:00
|
|
|
--directories "/usr/share/$(Appname)" \
|
|
|
|
-v $(version) \
|
|
|
|
--iteration $(iteration) \
|
|
|
|
$(dependencies) \
|
|
|
|
-p $(temp)/$(rpmname) \
|
|
|
|
-n $(Appname) \
|
|
|
|
-a $(arch) \
|
|
|
|
--prefix / *
|
2015-02-21 14:19:19 +00:00
|
|
|
|
2015-03-12 18:14:26 +00:00
|
|
|
rpm-jolla: build-tmp
|
2015-04-27 10:56:05 +00:00
|
|
|
cd $(temp);fpm -f -s dir -t rpm \
|
|
|
|
--after-install $(sourcePath)/dat/upgradeScript.sh \
|
|
|
|
--after-remove $(sourcePath)/dat/removeScript.sh \
|
2021-05-10 18:59:52 +00:00
|
|
|
--rpm-changelog $(sourcePath)/changelog.txt \
|
2015-04-27 10:56:05 +00:00
|
|
|
--directories "/usr/share/$(Appname)" \
|
|
|
|
-v $(version) \
|
|
|
|
--iteration $(iteration) \
|
|
|
|
$(dependencies) \
|
|
|
|
-p $(temp)/$(rpmname) \
|
|
|
|
-n $(Appname) \
|
|
|
|
-a $(arch) \
|
|
|
|
--prefix / *
|
2015-02-21 14:19:19 +00:00
|
|
|
|
|
|
|
send-virt:
|
2015-04-27 10:56:05 +00:00
|
|
|
cat $(temp)/$(rpmname) | ssh -i '$(sdkpath)/vmshare/ssh/private_keys/SailfishOS_Emulator/nemo' -p2223 $(ssh_user)@localhost \
|
|
|
|
cat ">" /tmp/$(rpmname) "&&" \
|
|
|
|
pkcon install-local -y /tmp/$(rpmname) "&&" \
|
|
|
|
rm /tmp/$(rpmname)
|
2021-05-10 18:59:52 +00:00
|
|
|
|
2015-02-21 14:19:19 +00:00
|
|
|
send-jolla-wifi:
|
2015-04-27 10:56:05 +00:00
|
|
|
cat $(temp)/$(rpmname) | ssh $(ssh_user)@$(jolla_wifi_ip) \
|
|
|
|
cat ">" /tmp/$(rpmname) "&&" \
|
|
|
|
pkcon install-local -y /tmp/$(rpmname) "&&" \
|
|
|
|
rm /tmp/$(rpmname)
|
2015-02-21 14:59:41 +00:00
|
|
|
|
2015-02-21 14:19:19 +00:00
|
|
|
send-jolla-ap: jolla_wifi_ip:=192.168.1.1
|
|
|
|
send-jolla-ap:
|
2015-04-27 10:56:05 +00:00
|
|
|
cat $(temp)/$(rpmname) | ssh $(ssh_user)@$(jolla_wifi_ip) \
|
|
|
|
cat ">" /tmp/$(rpmname) "&&" \
|
|
|
|
pkcon install-local -y /tmp/$(rpmname) "&&" \
|
|
|
|
rm /tmp/$(rpmname)
|
2015-02-21 14:59:41 +00:00
|
|
|
|
2015-04-06 23:18:17 +00:00
|
|
|
send-jolla-usb:
|
2015-04-27 10:56:05 +00:00
|
|
|
cat $(temp)/$(rpmname) | ssh $(ssh_user)@$(jolla_usb_ip) \
|
|
|
|
cat ">" /tmp/$(rpmname) "&&" \
|
|
|
|
pkcon install-local -y /tmp/$(rpmname) "&&" \
|
|
|
|
rm /tmp/$(rpmname)
|
2015-02-21 14:19:19 +00:00
|
|
|
|
2015-04-27 10:56:05 +00:00
|
|
|
send-only-virt:
|
|
|
|
cat $(temp)/$(rpmname) | ssh -i '$(sdkpath)/vmshare/ssh/private_keys/SailfishOS_Emulator/nemo' -p2223 $(ssh_user)@localhost \
|
|
|
|
cat ">" /tmp/$(rpmname)
|
2015-03-12 18:14:26 +00:00
|
|
|
|
2021-05-10 18:59:52 +00:00
|
|
|
clean:
|
2015-02-21 14:19:19 +00:00
|
|
|
rm -rf $(temp)
|
|
|
|
rm -rf $(builddir)
|
2015-02-21 14:59:41 +00:00
|
|
|
rm -rf ./$(rpmname)
|