47 lines
1.3 KiB
Bash
Executable file
47 lines
1.3 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 update
|
|
apt-get dist-upgrade -y
|
|
apt-get install -y --no-install-recommends wget ca-certificates fakeroot dpkg git
|
|
apt clean
|
|
}
|
|
|
|
prebuild(){
|
|
[ -e /tmp/${APP} ] && rm -fr /tmp/${APP}
|
|
git clone --depth 1 https://git.tt-rss.org/fox/tt-rss.git /tmp/${APP}
|
|
}
|
|
|
|
build() {
|
|
cd /tmp/${APP}
|
|
}
|
|
|
|
makedeb(){
|
|
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
|
|
}
|