46 lines
1.2 KiB
Bash
Executable file
46 lines
1.2 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
[ -e ./lib/function.sh ] && source ./lib/function.sh
|
|
|
|
APP=tt-rss
|
|
VERSION=$(date +%Y%m.%d.%H%M)
|
|
GIT_VERSION=$VERSION
|
|
DEB_VERSION=$VERSION
|
|
DEBIAN_VERSION_CODENAME=bullseye
|
|
IMAGE_SIZE=1
|
|
|
|
STEP="envinit prebuild makedeb"
|
|
# build
|
|
|
|
envinit() {
|
|
apt-get install -y --no-install-recommends wget ca-certificates fakeroot dpkg git
|
|
}
|
|
|
|
prebuild(){
|
|
rm -fr /tmp/tt-rss
|
|
git clone --depth 1 https://git.tt-rss.org/fox/tt-rss.git /tmp/tt-rss
|
|
}
|
|
|
|
build() {
|
|
cd /tmp/tt-rss
|
|
}
|
|
|
|
makedeb(){
|
|
GIT_VERSION=$1
|
|
DEB_VERSION=$2
|
|
PATH_DEB=/tmp/src/rootfs
|
|
|
|
cp -fr /tmp/tt-rss/* ${PATH_DEB}/usr/share/tt-rss/
|
|
mv ${PATH_DEB}/usr/share/tt-rss/cache ${PATH_DEB}/var/lib/tt-rss/
|
|
mv ${PATH_DEB}/usr/share/tt-rss/feed-icons ${PATH_DEB}/var/lib/tt-rss/
|
|
mv ${PATH_DEB}/usr/share/tt-rss/lock ${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 /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
|
|
}
|