fixing makefile, adding dirs and postinst for alternc-api package

This commit is contained in:
Benjamin Sonntag 2014-09-20 18:53:27 +02:00
parent 7794023804
commit b516f22c1e
3 changed files with 41 additions and 2 deletions

View File

@ -20,6 +20,6 @@ install:
install -m 0644 -g root -o root api.conf $(DESTDIR)/etc/alternc/apache-panel.d
install -m 0644 api.sql $(DESTDIR)/usr/share/alternc/
install -m 0644 -g 1999 -o root panel/* $(DESTDIR)/usr/share/alternc/panel/admin/api/
install -m 0644 ../lib/Alternc/Api/* $(DESTDIR)/usr/share/php/Alternc/Api/
install -m 0644 ../lib/Alternc/Api/Auth/* $(DESTDIR)/usr/share/php/Alternc/Api/Auth/
install -m 0644 ../lib/Alternc/Api/*.php $(DESTDIR)/usr/share/php/Alternc/Api/
install -m 0644 ../lib/Alternc/Api/Auth/*.php $(DESTDIR)/usr/share/php/Alternc/Api/Auth/

3
debian/alternc-api.dirs vendored Normal file
View File

@ -0,0 +1,3 @@
etc/alternc/apache-panel.d
usr/share/alternc/panel/admin/api
usr/share/php/Alternc/Api/Auth

36
debian/alternc-api.postinst vendored Normal file
View File

@ -0,0 +1,36 @@
#!/bin/bash -e
case "$1" in
configure)
echo "Installing mysql table"
mysql --defaults-file=/etc/alternc/my.cnf \
</usr/share/alternc/api.sql || true
# Refresh apache configuration
# configure /etc/alternc/templates/apache/httpd.conf
# configure /etc/alternc/templates/apache-ssl/httpd.conf
echo -e "\033[31m**********************************************"
echo "* ALTERNC-API ACTION REQUESTED *"
echo "* *"
echo "* Please run alternc.install to fully deploy *"
echo "**********************************************"
echo -e "\033[0m"
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
# vim: et sw=4