debmaker/ressources/rss-bridge/debmaker

31 lines
1005 B
Bash
Executable File

#!/bin/bash
VERSION=2022-06-14
APP=rss-bridge
DEPOT=https://github.com/RSS-Bridge/rss-bridge.git
GIT_VERSION=$VERSION
DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=1
STEP="base_package_upgrade default_prebuild makedeb"
makedeb(){
PATH_DEB=/tmp/src/rootfs
cp -fr /tmp/${APP} ${PATH_DEB}/usr/share/
cp ${PATH_DEB}/usr/share/rss-bridge/config.default.ini.php ${PATH_DEB}/etc/rss-bridge/config.ini.php
cp ${PATH_DEB}/usr/share/rss-bridge/whitelist.default.txt ${PATH_DEB}/etc/rss-bridge/whitelist.txt
ln -s /etc/${APP}/config.ini.php ${PATH_DEB}/usr/share/rss-bridge/config.ini.php
ln -s /etc/${APP}/whitelist.txt ${PATH_DEB}/usr/share/rss-bridge/whitelist.txt
mkdir -p ${PATH_DEB}/var/cache/rss-bridge/cache/
rm -r ${PATH_DEB}/usr/share/rss-bridge/cache
ln -s /var/cache/rss-bridge/cache/ ${PATH_DEB}/usr/share/rss-bridge/cache
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}