-
Notifications
You must be signed in to change notification settings - Fork 3
/
build-deb-web
executable file
·38 lines (27 loc) · 1.06 KB
/
build-deb-web
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
#!/bin/bash
set -e
VERSION=$(cat version)
echo "Build dep file for parental-control of $VERSION"
DIR="parental-control-web-$VERSION"
mkdir -p dist
cd dist
mkdir -p $DIR/DEBIAN
eval "cat ../debian-package-description-web" > $DIR/DEBIAN/control
cp ../scripts/web/postinst $DIR/DEBIAN/
cp ../scripts/web/prerm $DIR/DEBIAN/
touch $DIR/DEBIAN/changelog
echo "/etc/parental-control/config.yml" > $DIR/DEBIAN/conffiles
echo "/etc/parental-control/users-config.yml" >> $DIR/DEBIAN/conffiles
mkdir -p $DIR/usr/bin/
cp $HOME/.local/bin/parental-control-web $DIR/usr/bin/
mkdir -p $DIR/etc/parental-control
cp ../config-linux.yml $DIR/etc/parental-control/config.yml
cp ../schedule-daemon/users-config.yml $DIR/etc/parental-control/users-config.yml
mkdir -p $DIR/etc/init.d
cp ../scripts/web/parental-control-web $DIR/etc/init.d/
mkdir -p $DIR/usr/share/parental-control
cp ../web-ui/bundle.js $DIR/usr/share/parental-control
cp ../web-ui/index.html $DIR/usr/share/parental-control
chmod -R g-w $DIR
dpkg-deb --root-owner-group --build $DIR
alien --to-rpm --scripts --keep-version $DIR.deb