--- /dev/null
+python-itkacl (2.0) unstable; urgency=low
+
+ * Initial release.
+
+ -- Steinar H. Gunderson <sesse@samfundet.no> Tue, 14 May 2013 01:51:05 +0200
--- /dev/null
+Source: python-itkacl
+Maintainer: Steinar H. Gunderson <sesse@samfundet.no>
+Section: python
+Priority: optional
+Build-Depends: debhelper (>= 7), python, python-support (>= 0.8.4), libitkacl-dev, swig
+Standards-Version: 3.9.1
+XS-Python-Version: all
+
+Package: python-itkacl
+Architecture: any
+Depends: ${misc:Depends}, ${python:Depends}, ${shlibs:Depends}
+XB-Python-Version: ${python:Versions}
+Provides: ${python:Provides}
+Description: Python interface to ITKACL
+ This package contains the Python interface to ITKACL.
--- /dev/null
+#! /bin/sh
+
+set -e
+
+# This was added by stdeb to workaround Debian #479852. In a nutshell,
+# pycentral does not remove normally remove its symlinks on an
+# upgrade. Since we're using python-support, however, those symlinks
+# will be broken. This tells python-central to clean up any symlinks.
+if [ -e /var/lib/dpkg/info/python-itkacl.list ] && which pycentral >/dev/null 2>&1
+then
+ pycentral pkgremove python-itkacl
+fi
+
+#DEBHELPER#
--- /dev/null
+#!/usr/bin/make -f
+
+clean:
+ dh_testdir
+ dh_clean
+ python setup.py clean
+ $(RM) -r build/
+ $(RM) itkacl.py itkacl.pyc itkacl_wrap.c
+
+build:
+ python setup.py build_ext
+
+binary-indep:
+
+binary-arch:
+ dh_testroot
+ dh_prep
+ dh_installdirs
+ python setup.py install --root=debian/python-itkacl --install-layout=deb
+ dh_installdocs
+ dh_installchangelogs
+ dh_pysupport
+ dh_compress
+ dh_fixperms
+ dh_strip
+ dh_makeshlibs
+ dh_shlibdeps
+ dh_installdeb
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-arch
+
+.PHONY: clean build binary-indep binary-arch binary
--- /dev/null
+/* SWIG interface for libitkacl */
+%module itkacl
+
+/* Same as for Perl, except that we return a boolean, not an int. */
+%inline %{
+ extern int itkacl_check(char *realm, char *user, char *errmsg, size_t errmsgsize);
+ PyObject *check(char *realm, char *user)
+ {
+ char errmsg[1024];
+ int ret = itkacl_check(realm, user, errmsg, 1024);
+ if (ret == -1) {
+ PyErr_SetString(PyExc_RuntimeError, errmsg);
+ return NULL;
+ } else {
+ if (ret == 0) {
+ Py_INCREF(Py_True);
+ return Py_True;
+ } else {
+ Py_INCREF(Py_False);
+ return Py_False;
+ }
+ }
+ }
+%}
+
--- /dev/null
+#!/usr/bin/env python
+
+"""
+setup.py file for ITKACL
+"""
+
+from distutils.core import setup, Extension
+
+
+itkacl_module = Extension('_itkacl',
+ sources=['itkacl.i'],
+ libraries=['itkacl'],
+ )
+
+setup (name = 'itkacl',
+ version = '2.0',
+ author = "Steinar H. Gunderson",
+ description = """Python interface to ITKACL""",
+ ext_modules = [itkacl_module],
+ py_modules = ["itkacl"],
+ )