debmaker/ressources/tt-rss/debmaker

37 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
APP=tt-rss
VERSION=$(date +%Y%m.%d.%H%M)
GIT_VERSION=last
DEB_VERSION=$VERSION
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=1
DEPOT=https://git.tt-rss.org/fox/tt-rss.git
main(){
base_package_upgrade
get_git_source
makedeb
}
makedeb(){
PATH_DEB=/tmp/src/rootfs
cp -fr /tmp/${APP}/* ${PATH_DEB}/usr/share/tt-rss/
mv ${PATH_DEB}/usr/share/tt-rss/{cache,feed-icons,lock,plugins.local,templates.local,themes.local} ${PATH_DEB}/var/lib/tt-rss/
mv ${PATH_DEB}/usr/share/tt-rss/config.php-dist ${PATH_DEB}/etc/tt-rss/config.php
ln -s /var/lib/tt-rss/cache ${PATH_DEB}/usr/share/tt-rss/cache
ln -s /var/lib/tt-rss/feed-icons ${PATH_DEB}/usr/share/tt-rss/feed-icons
ln -s /var/lib/tt-rss/lock ${PATH_DEB}/usr/share/tt-rss/lock
ln -s /var/lib/tt-rss/lock ${PATH_DEB}/usr/share/tt-rss/plugins.local
ln -s /var/lib/tt-rss/lock ${PATH_DEB}/usr/share/tt-rss/templates.local
ln -s /var/lib/tt-rss/lock ${PATH_DEB}/usr/share/tt-rss/themes.local
ln -s /etc/tt-rss/config.php ${PATH_DEB}/usr/share/tt-rss/config.php
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}