diff --git a/control b/control index cbfa688a..ddc95a32 100644 --- a/control +++ b/control @@ -1,3 +1,4 @@ +#WARNING: autogenerated control please use ./debian/gen-default-control.sh (see control.in) Source: lasso Priority: optional Section: libs @@ -60,6 +61,18 @@ Description: Library for Liberty Alliance and SAML protocols - Python bindings This package contains Python bindings for liblasso, needed to use lasso in Python applications. +Package: liblasso-java +Section: libs +Architecture: amd64 armel i386 ia64 mips mipsel powerpc ppc64 s390 sparc kfreebsd-i386 kfreebsd-amd64 +Depends: ${shlibs:Depends}, ${misc:depends} +Description: Library for Liberty Alliance and SAML protocols - Java bindings + Lasso is an implementation of Liberty Alliance and related protocols, for + network identity federations, single sign-on and other web services protocols. + The main specifications implemented by the library are ID-FF, ID-WSF and SAML. + . + This package provides the Java interface to liblasso, needed to use lasso in + Java applications + Package: liblasso-perl Section: perl Architecture: any @@ -83,3 +96,4 @@ Description: Library for Liberty Alliance and SAML protocols - PHP 5 bindings . This package contains PHP bindings for liblasso, needed to use lasso in PHP applications. + diff --git a/control.in b/control.in new file mode 100644 index 00000000..3dc7a45d --- /dev/null +++ b/control.in @@ -0,0 +1,98 @@ +Source: lasso +Priority: optional +Section: libs +Maintainer: Frederic Peters +Build-Depends: debhelper (>= 8), dh-python, libxml2-dev, libxslt1-dev, libxmlsec1-dev, libxmlsec1-openssl, libglib2.0-dev, python-all-dev (>= 2.6.6-3~), python3-all-dev (>= 3.2), libexpat1-dev, fastjar, php5-dev, python-lxml, python3-lxml, python-six, python3-six, chrpath, dh-python +Standards-Version: 3.9.6 +X-Python-Version: >= 2.6 +X-Python3-Version: >= 3.2 +Homepage: http://lasso.entrouvert.org + +Package: liblasso3-dev +Section: libdevel +Architecture: any +Depends: liblasso3 (= ${binary:Version}), libxml2-dev, libxmlsec1-dev, libglib2.0-dev +Provides: liblasso-dev +Conflicts: liblasso-dev, liblasso0, liblasso1 +Description: Library for Liberty Alliance and SAML protocols - development kit + Lasso is an implementation of Liberty Alliance and related protocols, for + network identity federations, single sign-on and other web services protocols. + The main specifications implemented by the library are ID-FF, ID-WSF and SAML. + . + This package contains the development files for Lasso. + +Package: liblasso3 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Library for Liberty Alliance and SAML protocols - runtime library + Lasso is an implementation of Liberty Alliance and related protocols, for + network identity federations, single sign-on and other web services protocols. + The main specifications implemented by the library are ID-FF, ID-WSF and SAML. + . + This package contains liblasso library used by applications to gain Library + Alliance support. + +Package: python-lasso +Conflicts: liblasso0-python2.3, python2.3-lasso, python2.4-lasso +Replaces: liblasso0-python2.3, python2.3-lasso, python2.4-lasso +Provides: liblasso0-python2.3, ${python:Provides} +Section: python +Architecture: any +Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:depends} +Description: Library for Liberty Alliance and SAML protocols - Python bindings + Lasso is an implementation of Liberty Alliance and related protocols, for + network identity federations, single sign-on and other web services protocols. + The main specifications implemented by the library are ID-FF, ID-WSF and SAML. + . + This package contains Python bindings for liblasso, needed to use lasso + in Python applications. + +Package: python3-lasso +Section: python +Architecture: any +Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:depends} +Description: Library for Liberty Alliance and SAML protocols - Python bindings + Lasso is an implementation of Liberty Alliance and related protocols, for + network identity federations, single sign-on and other web services protocols. + The main specifications implemented by the library are ID-FF, ID-WSF and SAML. + . + This package contains Python bindings for liblasso, needed to use lasso + in Python applications. + +#JAVA#Package: liblasso-java +#JAVA#Section: libs +#JAVA#Architecture: amd64 armel i386 ia64 mips mipsel powerpc ppc64 s390 sparc kfreebsd-i386 kfreebsd-amd64 +#JAVA#Depends: ${shlibs:Depends}, ${misc:depends} +#JAVA#Description: Library for Liberty Alliance and SAML protocols - Java bindings +#JAVA# Lasso is an implementation of Liberty Alliance and related protocols, for +#JAVA# network identity federations, single sign-on and other web services protocols. +#JAVA# The main specifications implemented by the library are ID-FF, ID-WSF and SAML. +#JAVA# . +#JAVA# This package provides the Java interface to liblasso, needed to use lasso in +#JAVA# Java applications + +Package: liblasso-perl +Section: perl +Architecture: any +Depends: ${shlibs:Depends}, ${misc:depends}, ${perl:Depends} +Description: Library for Liberty Alliance and SAML protocols - Perl bindings + Lasso is an implementation of Liberty Alliance and related protocols, for + network identity federations, single sign-on and other web services protocols. + The main specifications implemented by the library are ID-FF, ID-WSF and SAML. + . + This package contains Perl bindings for liblasso, needed to use lasso + in Perl applications. + +Package: php5-lasso +Section: web +Architecture: any +Depends: ${shlibs:Depends}, ${php:Depends}, ${misc:depends} +Description: Library for Liberty Alliance and SAML protocols - PHP 5 bindings + Lasso is an implementation of Liberty Alliance and related protocols, for + network identity federations, single sign-on and other web services protocols. + The main specifications implemented by the library are ID-FF, ID-WSF and SAML. + . + This package contains PHP bindings for liblasso, needed to use lasso + in PHP applications. + diff --git a/gen-default-control.sh b/gen-default-control.sh new file mode 100755 index 00000000..a9fe63dc --- /dev/null +++ b/gen-default-control.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ -f "debian/control.in" ]; then + PATH="debian" +elif [ -f "./control.in" ]; then + PATH="." +else + echo "Error control.in not found" 1>&2 + exit 1 +fi + +echo "#WARNING: autogenerated control please use ./debian/gen-default-control.sh (see control.in)" > ${PATH}/control +/bin/sed -e 's/^#JAVA#//' < ${PATH}/control.in >> ${PATH}/control diff --git a/liblasso-java.dirs b/liblasso-java.dirs new file mode 100644 index 00000000..0b70e893 --- /dev/null +++ b/liblasso-java.dirs @@ -0,0 +1 @@ +usr/lib/jni/ diff --git a/liblasso-java.install b/liblasso-java.install new file mode 100644 index 00000000..758673ed --- /dev/null +++ b/liblasso-java.install @@ -0,0 +1,2 @@ +debian/tmp/usr/lib/jni/*.so +debian/tmp/usr/share/java/*.jar diff --git a/liblasso-perl.install.in b/liblasso-perl.install.in index 7d954753..6f786063 100644 --- a/liblasso-perl.install.in +++ b/liblasso-perl.install.in @@ -1,2 +1 @@ -debian/tmp/${archlib}/auto/Lasso/* -debian/tmp/${archlib}/*.pm +debian/tmp/${archlib} diff --git a/rules b/rules index e9f0bda2..bbd34115 100644 --- a/rules +++ b/rules @@ -6,7 +6,6 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -include /usr/share/python/python.mk # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) @@ -15,13 +14,23 @@ DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_TARGET_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) +ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}') + +with_java := no +no_java_archs := alpha arm hppa hurd-i386 +ifneq ($(DEB_TARGET_ARCH),i386) + ifneq ($(DEB_TARGET_ARCH),amd64) + ifeq ($(DEB_TARGET_ARCH), $(findstring $(DEB_TARGET_ARCH),$(no_java_archs))) + with_java := disabled for architecture $(DEB_TARGET_ARCH) + endif + endif +endif + PYDEF := $(shell pyversions -vd) PYVERS := $(shell pyversions -vr debian/control) -PY3VERS := $(shell py3versions -vr '>= 3.0') +PY3VERS := $(shell py3versions -vr '>= 3.0') OTHERPYVERS := $(filter-out $(PYDEF), $(PYVERS)) -PERLARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}') - CFLAGS = `dpkg-buildflags --get CFLAGS` CFLAGS += -Wall LDFLAGS = `dpkg-buildflags --get LDFLAGS` @@ -43,13 +52,20 @@ CONFIGURE_ARGS := \ --enable-tests=no \ --disable-gtk-doc \ --enable-perl \ - --disable-java \ --with-php5-config-dir=/etc/php5/mods-available/ +ifeq ($(with_java),yes) + CONFIGURE_ARGS += --enable-java +else + CONFIGURE_ARGS += --disable-java +endif + + config.status: configure dh_testdir # Add here commands to configure the package. + autoreconf -fi CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) $(CONFIGURE_ARGS) @@ -67,7 +83,6 @@ build-stamp: config.status $(MAKE) -C bindings/python$$v clean; \ $(MAKE) -C bindings/python$$v; \ done - for v in $(PY3VERS); do \ rm -rf bindings/python$$v; \ cp -a bindings/python bindings/python$$v; \ @@ -83,17 +98,23 @@ clean: dh_testroot rm -f build-stamp +ifeq ($(with_java),yes) + sed -e 's/^#JAVA#//' < debian/control.in > debian/control +else + sed -e 's/^#JAVA#.*//' < debian/control.in > debian/control +endif + [ ! -f Makefile ] || $(MAKE) distclean for v in $(OTHERPYVERS); do \ rm -rf bindings/python$$v; \ done - for v in $(PY3VERS); do \ rm -rf bindings/python$$v; \ done rm -f config.log + rm -f debian/liblasso-perl.install dh_clean @@ -103,8 +124,6 @@ install: build dh_clean -k dh_installdirs - sed -e 's,$${archlib},$(PERLARCHLIB),g' debian/liblasso-perl.install.in > debian/liblasso-perl.install - # Add here commands to install the package into debian/tmp $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp \ GACUTIL="/usr/bin/gacutil -root $(CURDIR)/debian/tmp/usr/lib" @@ -116,6 +135,18 @@ install: build $(MAKE) -C bindings/python$$v install DESTDIR=$(CURDIR)/debian/tmp; \ done + + mkdir $(CURDIR)/debian/tmp/usr/lib/jni/ + if [ -e $(CURDIR)/debian/tmp/usr/lib/java ]; then \ + mv $(CURDIR)/debian/tmp/usr/lib/java/*.so $(CURDIR)/debian/tmp/usr/lib/jni/ ; \ + fi + + sed -e 's,$${archlib},$(ARCHLIB),g' debian/liblasso-perl.install.in > debian/liblasso-perl.install + + # remove id-wsf directory if it is empty + -rmdir $(CURDIR)/debian/tmp/usr/include/lasso/id-wsf/ + + # Build architecture-independent files here. binary-indep: build install #dh_makeclilibs -L liblasso-cil -r @@ -129,7 +160,7 @@ binary-arch: build install dh_installexamples -XCVS dh_installman dh_install - chrpath -d $(CURDIR)/debian/liblasso-perl$(PERLARCHLIB)/auto/Lasso/Lasso.so + chrpath -d $(CURDIR)/debian/liblasso-perl/$(ARCHLIB)/auto/Lasso/Lasso.so dh_link dh_strip dh_perl