2015-02-21 14:59:41 +00:00
|
|
|
Appname:=$(shell cat appname.txt)
|
2015-03-05 15:12:47 +00:00
|
|
|
temp:=/tmp/fpm-jolla
|
2015-04-27 10:56:05 +00:00
|
|
|
sourcePath:=$(shell pwd)
|
2024-04-02 01:26:03 +00:00
|
|
|
output:=$(sourcePath)/output
|
2015-02-21 15:53:25 +00:00
|
|
|
dependencies=$(shell for file in `cat dependencies.txt`;do echo "-d "$${file};done;)
|
2024-04-02 01:26:03 +00:00
|
|
|
version:=0.5.0
|
2024-04-04 07:40:00 +00:00
|
|
|
iteration:=25
|
2024-04-02 01:26:03 +00:00
|
|
|
fpmExec:=$(shell echo "$${FPM_BIN:=fpm}")
|
2015-02-21 14:19:19 +00:00
|
|
|
|
2023-03-13 19:21:48 +00:00
|
|
|
all: clean build-tmp rpm-i686 rpm-jolla rpm-aarch64
|
2015-02-21 14:19:19 +00:00
|
|
|
|
2021-05-10 18:59:52 +00:00
|
|
|
build-tmp:
|
2024-04-02 01:26:03 +00:00
|
|
|
mkdir -p $(output)
|
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
|
2021-05-17 00:43:14 +00:00
|
|
|
mkdir -p $(temp)/usr/share/$(Appname)/src
|
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)
|
|
|
|
|
2024-04-02 01:26:03 +00:00
|
|
|
build: rpmname=$(Appname)-$(version)-$(iteration).$(arch).rpm
|
|
|
|
build: build-tmp
|
|
|
|
cd $(temp); \
|
|
|
|
$(fpmExec) -f -s dir -t rpm \
|
2015-04-27 10:56:05 +00:00
|
|
|
--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) \
|
2024-04-02 01:26:03 +00:00
|
|
|
--prefix / *; \
|
|
|
|
mv $(temp)/*.rpm $(output)
|
2015-02-21 14:19:19 +00:00
|
|
|
|
2024-04-02 01:26:03 +00:00
|
|
|
rpm-i686: arch=i686
|
|
|
|
rpm-i686: build
|
2015-02-21 14:19:19 +00:00
|
|
|
|
2024-04-02 01:26:03 +00:00
|
|
|
rpm-jolla: arch=armv7hl
|
|
|
|
rpm-jolla: build
|
|
|
|
|
|
|
|
rpm-aarch64: arch=aarch64
|
|
|
|
rpm-aarch64: build
|
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)
|
2023-03-13 19:21:48 +00:00
|
|
|
rm -rf ./$(Appname)-$(version)-$(iteration)*
|