Add Debian packaging files

This commit is contained in:
Kienan Stewart 2018-12-23 23:41:27 -05:00
parent a8223a2139
commit 40af55b4b6
8 changed files with 58 additions and 3 deletions

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
alternc-wsgi-py3 (1.0.0) unstable; urgency=medium
* Initial release.
-- Kienan Stewart <kienan.stewart@burntworld.ca> Sun, 23 Dec 2018 15:13:31 -0500

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
10

22
debian/control vendored Normal file
View File

@ -0,0 +1,22 @@
Source: alternc-wsgi-py3
Section: admin
Priority: optional
Maintainer: Kienan Stewart <kienan.stewart@burntworld.ca>
Build-Depends:
debhelper (>= 10)
Standards-Version: 4.2.1
Package: alternc-wsgi-py3
Architecture: all
Depends:
alternc (>= 3.5.0~rc1),
alternc-nss,
libapache2-mod-wsgi-py3,
${shlibs:Depends},
${misc:Depends}
Recommends:
python3-pip,
python3-venv
Description: AlternC plugin for creating subdomains for Python applications
alternc-wsgi is an AlternC plugin for creating subdomains which run Python
applications using WSGI.

3
debian/copyright vendored Normal file
View File

@ -0,0 +1,3 @@
Files: *
Copyright: 2018 Kienan Stewart <kienan.stewart@burntworld.ca>
License: GPLv3+

3
debian/install vendored Normal file
View File

@ -0,0 +1,3 @@
src/m_wsgipy3.php usr/share/alternc/panel/class/
src/schema/schema.sql usr/share/alternc/install/alternc-wsgi-py3/
src/templates/ etc/alternc/

16
debian/postinst vendored
View File

@ -1,8 +1,13 @@
#!/bin/bash #!/bin/bash
set -e
#DEBHELPER#
case "$1" in case "$1" in
configure) configure)
mysql --defaults-file=/etc/alternc/my.cnf -e "INSERT INTO domaines_type if ! mysql --defaults-file=/etc/alternc/my.cnf -e 'select name from domaines_type where name = "wsgi";' | grep -q 'wsgi' ; then
mysql --defaults-file=/etc/alternc/my.cnf -e "INSERT INTO domaines_type
(name, description, target, entry, compatibility, enable, only_dns, need_dns, advanced, create_tmpdir, create_targetdir, has_https_option) VALUES (name, description, target, entry, compatibility, enable, only_dns, need_dns, advanced, create_tmpdir, create_targetdir, has_https_option) VALUES
('wsgi', 'Locally hosted (WSGI Python3)', 'DIRECTORY', '%SUB% IN A @@PUBLIC_IP@@', ('wsgi', 'Locally hosted (WSGI Python3)', 'DIRECTORY', '%SUB% IN A @@PUBLIC_IP@@',
'txt,defmx,defmx2,mx,mx2', 'ALL', 0, 0, 1, 1, 1, 1), 'txt,defmx,defmx2,mx,mx2', 'ALL', 0, 0, 1, 1, 1, 1),
@ -12,4 +17,9 @@ case "$1" in
'txt,defmx,defmx2,mx,mx2', 'NONE', 0, 0, 1, 1, 1, 0), 'txt,defmx,defmx2,mx,mx2', 'NONE', 0, 0, 1, 1, 1, 0),
('wsgi-https', 'WSGI Python3 (HTTPS)', 'DIRECTORY', '%SUB% IN A @@PUBLIC_IP@@', ('wsgi-https', 'WSGI Python3 (HTTPS)', 'DIRECTORY', '%SUB% IN A @@PUBLIC_IP@@',
'txt,defmx,defmx2,mx,mx2', 'NONE', 0, 0, 1, 1, 1, 0); 'txt,defmx,defmx2,mx,mx2', 'NONE', 0, 0, 1, 1, 1, 0);
" "
fi
mysql --defaults-file=/etc/alternc/my.cnf < /usr/share/alternc/install/alternc-wsgi-py3/schema.sql
a2enmod wsgi && service apache2 reload
;;
esac

10
debian/rules vendored Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/make -f
include /usr/share/dpkg/default.mk
%:
dh $@
overrtide_dh_auto_install:
mkdir -p usr/share/alternc/schema/alternc-wsgi-py3
cp -r src/schema/* usr/share/alternc/schema/alternc-wsgi-py3/

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (native)