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
|
|
|
builddir:=./build
|
|
|
|
sdkpath:=$(HOME)/SailfishOS
|
2015-02-21 15:53:25 +00:00
|
|
|
dependencies=$(shell for file in `cat dependencies.txt`;do echo "-d "$${file};done;)
|
2015-02-21 14:19:19 +00:00
|
|
|
arch:=noarch
|
|
|
|
rpmname:=$(Appname)-$(arch).rpm
|
|
|
|
jolla_usb_ip:=192.168.2.15
|
|
|
|
jolla_wifi_ip:=Jolla
|
|
|
|
|
|
|
|
|
|
|
|
all: clean build-tmp rpm-virt rpm-jolla
|
|
|
|
|
2015-02-21 14:59:41 +00:00
|
|
|
make-jolla-usb: build-tmp rpm-jolla send-jolla
|
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
|
|
|
|
make-virt: build-tmp rpm-virt send-virt
|
|
|
|
|
|
|
|
build-tmp:
|
|
|
|
rm -rf $(temp)
|
|
|
|
mkdir -p $(temp)/usr/share/applications
|
|
|
|
mkdir -p $(temp)/usr/share/$(Appname)/src
|
|
|
|
mkdir -p $(temp)/usr/share/$(Appname)/src
|
|
|
|
mkdir -p $(temp)/usr/bin
|
|
|
|
cp -ar ./qml $(temp)/usr/share/$(Appname)
|
|
|
|
cp -ar ./src/*.py $(temp)/usr/share/$(Appname)/src
|
|
|
|
cp -ar ./pyPackages $(temp)/usr/share/$(Appname)/src
|
|
|
|
cp ./dat/$(Appname).desktop $(temp)/usr/share/applications/
|
|
|
|
install -m 755 ./dat/$(Appname).sh $(temp)/usr/bin/$(Appname)
|
|
|
|
|
|
|
|
rpm-virt:
|
2015-02-21 14:59:41 +00:00
|
|
|
cd $(temp);fpm -f -s dir -t rpm $(dependencies) -p $(CURDIR)/$(rpmname) -n $(Appname) -a $(arch) --prefix / *
|
2015-02-21 14:19:19 +00:00
|
|
|
|
|
|
|
rpm-jolla:
|
2015-02-21 14:59:41 +00:00
|
|
|
cd $(temp);fpm -f -s dir -t rpm $(dependencies) -p $(CURDIR)/$(rpmname) -n $(Appname) -a $(arch) --prefix / *
|
2015-02-21 14:19:19 +00:00
|
|
|
|
|
|
|
send-virt:
|
2015-03-05 15:12:47 +00:00
|
|
|
cat ./$(rpmname) | ssh -p2223 -i $(sdkpath)/vmshare/ssh/private_keys/SailfishOS_Emulator/root root@localhost cat ">>" /tmp/$(rpmname) "&&" pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname)
|
2015-02-21 14:19:19 +00:00
|
|
|
|
|
|
|
send-jolla-wifi:
|
2015-03-05 15:12:47 +00:00
|
|
|
cat ./$(rpmname) | ssh root@$(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-03-05 15:12:47 +00:00
|
|
|
cat ./$(rpmname) | ssh root@$(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:
|
2015-03-05 15:12:47 +00:00
|
|
|
cat ./$(rpmname) | ssh root@$(jolla_usb_ip) cat ">>" /tmp/$(rpmname) "&&" pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname)
|
2015-02-21 14:19:19 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf $(temp)
|
|
|
|
rm -rf $(builddir)
|
2015-02-21 14:59:41 +00:00
|
|
|
rm -rf ./$(rpmname)
|
2015-02-21 14:19:19 +00:00
|
|
|
|
|
|
|
|