forked from webketje/tuxedo-backlight-control
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pack.sh
executable file
·91 lines (80 loc) · 1.78 KB
/
pack.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
if [ ! -d dist ]; then
mkdir dist
else
rm -rf dist/*
fi
pkg='tuxedo-backlight-control'
ver='0.7'
maintainer='Kevin Van Lierde <[email protected]>'
url='https://github.com/webketje/tuxedo-backlight-control'
prerm='../build/DEBIAN/prerm'
postinst='../build/DEBIAN/postinst'
category='contrib/utils'
desc='GUI utility built on top of TUXEDO Kernel module for keyboard backlighting
(https://github.com/tuxedocomputers/tuxedo-keyboard).
Provides a bash CLI (backlight) and a minimal Python UI.'
cd src
# DEBIAN
fpm -s dir\
-t deb\
-f\
-n "$pkg"\
-v "$ver"\
--iteration 1\
--maintainer "$maintainer"\
--vendor "webketje"\
--url "$url"\
--description "Tuxedo Backlight Ctrl
$desc"\
--deb-priority optional\
--category "$category"\
--license MIT\
--depends python3\
--depends python3-tk\
--depends policykit-1\
--after-install "$postinst"\
--before-remove "$prerm"\
usr etc
mv "${pkg}_$ver-1_amd64.deb" "../dist/${pkg}_$ver-1_amd64.deb"
# ARCH
fpm -s dir\
-t pacman\
-f\
-n "$pkg"\
-v "$ver"\
-a any\
--iteration 1\
--maintainer "$maintainer"\
--vendor "webketje"\
--url "$url"\
--description "$desc"\
--category "$category"\
--license MIT\
--depends python\
--depends tk\
--depends polkit\
--after-install "$postinst"\
--before-remove "$prerm"\
usr etc
mv "$pkg-$ver-1-any.pkg.tar.xz" "../dist/$pkg-$ver-1-any.pkg.tar.xz"
# RED HAT
fpm -s dir\
-t rpm\
-f\
-n "$pkg"\
-v "$ver"\
-a any\
--iteration 1\
--maintainer "$maintainer"\
--vendor "webketje"\
--url "$url"\
--description "$desc"\
--category "$category"\
--license MIT\
--depends python\
--depends tk\
--depends polkit\
--after-install "$postinst"\
--before-remove "$prerm"\
usr etc
mv "$pkg-$ver-1.any.rpm" "../dist/$pkg-$ver-1.any.rpm"