diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..199a818 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +alternc-wsgi-py3 (1.0.0) unstable; urgency=medium + + * Initial release. + + -- Kienan Stewart Sun, 23 Dec 2018 15:13:31 -0500 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +10 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..f888c8a --- /dev/null +++ b/debian/control @@ -0,0 +1,22 @@ +Source: alternc-wsgi-py3 +Section: admin +Priority: optional +Maintainer: Kienan Stewart +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. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..7f9be0b --- /dev/null +++ b/debian/copyright @@ -0,0 +1,3 @@ +Files: * +Copyright: 2018 Kienan Stewart +License: GPLv3+ diff --git a/debian/install b/debian/install new file mode 100644 index 0000000..9e15164 --- /dev/null +++ b/debian/install @@ -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/ diff --git a/debian/postinst b/debian/postinst index 98e427f..72f9a2d 100755 --- a/debian/postinst +++ b/debian/postinst @@ -1,8 +1,13 @@ #!/bin/bash +set -e + +#DEBHELPER# + case "$1" in - configure) - mysql --defaults-file=/etc/alternc/my.cnf -e "INSERT INTO domaines_type + configure) + 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 ('wsgi', 'Locally hosted (WSGI Python3)', 'DIRECTORY', '%SUB% IN A @@PUBLIC_IP@@', '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), ('wsgi-https', 'WSGI Python3 (HTTPS)', 'DIRECTORY', '%SUB% IN A @@PUBLIC_IP@@', 'txt,defmx,defmx2,mx,mx2', 'NONE', 0, 0, 1, 1, 1, 0); -" \ No newline at end of file +" + fi + mysql --defaults-file=/etc/alternc/my.cnf < /usr/share/alternc/install/alternc-wsgi-py3/schema.sql + a2enmod wsgi && service apache2 reload + ;; +esac diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..dab92f5 --- /dev/null +++ b/debian/rules @@ -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/ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native)