--- /dev/null
+# Configuration for timetracker
+Alias /timetracker/ /usr/share/php/timetracker/
+
--- /dev/null
+Source: timetracker
+Section: main
+Priority: optional
+Maintainer: Michael Wagner <michael@wagnertech.de>
+Build-Depends: git
+
+Package: timetracker
+Architecture: all
+Depends: php5-mysql|php-mysql, php5|php-mbstring
+Description: Anuko Time Tracker
+
--- /dev/null
+#!/bin/bash
+set -e
+
+mkdir -p $1/usr/share/php/timetracker
+rsync -a --delete --exclude='.git' Downloads/timetracker/ $1/usr/share/php/timetracker/
+
+mkdir -p $1/etc/apache2/sites-available
+cp debian/timetracker.conf $1/etc/apache2/sites-available/
+
+mkdir -p $1/usr/share/doc/timetracker
+cp Downloads/timetracker/license.txt $1/usr/share/doc/timetracker/copyright
+
--- /dev/null
+#!/bin/bash
+set -e
+
+a2ensite timetracker.conf
+#systemd restart apache2
+/etc/init.d/apache2 restart
+
+chmod 777 /usr/share/php/timetracker/WEB-INF/templates_c
+
+# check, whether sysal user exists
+if ! mysql -uttuser -pTtuser09 timetracker -e";"
+then
+ echo "Installation of ttuser user ..."
+ echo "Password of mysql root:"
+ read pw
+ mysql -uroot -p$pw <<END
+create user ttuser@localhost identified by 'Ttuser09';
+create database timetracker CHARACTER SET = 'utf8mb4';
+grant all on timetracker.* to ttuser@localhost;
+END
+fi
+
+# Create Config File
+pushd /usr/share/php/timetracker/WEB-INF
+ if [ ! -f config.php ]
+ then
+ echo "copy standard config file"
+ cp config.php.dist config.php
+ fi
+popd
+
+echo "Check database with http://localhost/timetracker/dbinstall.php"
+echo "Login at http://localhost/timetracker/login.php"
+echo "Initial password: admin/secret"
+echo "Further information: https://www.anuko.com/time_tracker/index.htm"
+
--- /dev/null
+#!/bin/bash
+set -e
+
+mkdir -p Downloads
+cd Downloads
+
+if [ -d timetracker ]
+then
+ cd timetracker
+ git fetch -t
+else
+ git clone https://github.com/anuko/timetracker
+ cd timetracker
+fi
+
+# determine version
+version=$(grep "APP_VERSION" initialize.php |sed 's/define("APP_VERSION", "//' |sed 's/".*//')
+echo $version
+echo "version=$version" >> ../../debian/setenv.sh
+
echo " -C <cross environment>"
echo " -d : compile"
echo " -p : pack default: do all"
+ echo " -v : set version"
echo " -o : support old Debian 7 format"
}
configure=0
compile=0
pack=0
-while getopts "a:cC:dpo" opt; do
+while getopts "a:cC:dpov:" opt; do
case $opt in
a) ARCH=$OPTARG
;;
;;
o) oldpack="-Zgzip"
;;
+ v) optversion=$OPTARG
+ ;;
\?) echo "Invalid option: -$OPTARG"
echo_usage
exit 1
echo "oldpack=\"$oldpack\"" >> debian/setenv.sh
set_build
- check_version
+ if [ -z "$optversion" ]
+ then
+ check_version
+ else
+ version=$optversion
+ fi
echo "version=$version" >> debian/setenv.sh
echo "build=$build" >> debian/setenv.sh
if grep "^Architecture: *all" debian/$paket.control >/dev/null
then
echo "arch = all" >> debian/rules.pre
- echo "BINARY_INDEP = copy ../${paket}_$version-${build}_all.deb" >> debian/rules.pre
+ echo 'BINARY_INDEP = copy ../$(paket)_$(version)-$(build)_all.deb' >> debian/rules.pre
else
echo 'arch = ${DEB_HOST_ARCH}' >> debian/rules.pre
echo "BINARY_ARCH = copy ../${paket}_$version-${build}_"'$(arch).deb' >> debian/rules.pre
fi
+ if ! [ -f $paket.changelog ]
+ then
+ echo "changelog_source = debian/default.changelog" >> debian/rules.pre
+ if [ -f debian/default.changelog ]
+ then
+ rm debian/default.changelog
+ fi
+ fi
elif [ -f debian/$paket.cp ]
then
echo "PACK=zip" >> debian/rules.pre
DEB = fakeroot dpkg-deb --build $(oldpack) debian/tmp
INSERT_BUILD = /usr/share/mbuild/insert_build.sh
RSYNC_OPT = -av --exclude="build" --exclude="debian/tmp" --exclude="Packages" --exclude="*Aktuell" --exclude=".*"
+
std_inst_tgt = debian/tmp/usr/share/doc/$(paket)/copyright debian/tmp/usr/share/doc/$(paket)/README.debian
+changelog_source = $(paket).changelog
include debian/rules.pre
debian/control: debian/$(paket).control
sed "s/_DEB_HOST_ARCH/${DEB_HOST_ARCH}/" debian/$(paket).control > debian/control
-debian/changelog: debian/$(paket).changelog debian/rules.pre
- sed "s/%BUILD%/$(build)/" debian/$(paket).changelog > debian/changelog
+debian/changelog: $(changelog_source) debian/rules.pre
+ sed "s/%BUILD%/$(build)/" $(changelog_source) > debian/changelog
debian/tmp/usr/share/doc/$(paket)/changelog: debian/changelog
mkdir -p debian/tmp/usr/share/doc/$(paket)
debian/copyright:
cp /usr/share/mbuild/copyright debian/copyright
+debian/default.changelog:
+ @echo "$(paket) ($(version)-$(build)) unstable; urgency=medium" >debian/default.changelog
+ @echo " * generated" >>debian/default.changelog
+ @echo " -- Michael Wagner <michael@wagnertech.de> Thu, 11 Feb 2021 10:00:00 +0100" >>debian/default.changelog
+
# Load project specification
-include rules.post