debmaker/ressources/wallabag/wallabag

41 lines
1.5 KiB
Plaintext
Raw Normal View History

#!/bin/bash
2022-02-20 15:02:18 +01:00
STEP="envinit prebuild build makedeb"
envinit() {
apt-get install -y --no-install-recommends wget ca-certificates composer git php-common php-xml php-json php-gd php-mbstring php-xml php-tidy php-curl php-tokenizer php-bcmath php-intl php-fpm unzip fakeroot dpkg
}
prebuild(){
GIT_VERSION=$1
git clone --depth 1 -b ${GIT_VERSION} https://github.com/wallabag/wallabag.git /tmp/wallabag
}
build() {
cd /tmp/wallabag
SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist -n --no-scripts
}
makedeb(){
2022-02-20 15:02:18 +01:00
GIT_VERSION=$1
DEB_VERSION=$2
2022-02-24 00:02:53 +01:00
PATH_DEB=/tmp/src/rootfs
2022-02-20 15:02:18 +01:00
cp -fr /tmp/wallabag/app ${PATH_DEB}/usr/share/wallabag/app
cp -fr /tmp/wallabag/src ${PATH_DEB}/usr/share/wallabag/src
cp -fr /tmp/wallabag/vendor ${PATH_DEB}/usr/share/wallabag/vendor
cp -fr /tmp/wallabag/web ${PATH_DEB}/usr/share/wallabag/web
2022-02-21 22:18:59 +01:00
echo need by synfony to find project directory > ${PATH_DEB}/usr/share/wallabag/composer.json
2022-02-20 15:02:18 +01:00
cp -fr /tmp/wallabag/data ${PATH_DEB}/var/lib/wallabag/data
cp -fr /tmp/wallabag/var ${PATH_DEB}/var/lib/wallabag/var
2022-02-20 15:02:18 +01:00
cp /tmp/wallabag/app/config/parameters.yml.dist ${PATH_DEB}/etc/wallabag/parameters.yml
ln -s /var/lib/wallabag/data ${PATH_DEB}/usr/share/wallabag/data
ln -s /var/lib/wallabag/var ${PATH_DEB}/usr/share/wallabag/var
ln -s /etc/wallabag/parameters.yml ${PATH_DEB}/usr/share/wallabag/app/config/parameters.yml
2022-02-24 00:02:53 +01:00
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}