From e762ca12a50b5ccf752536c9c01c1bab2fb5dceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Thu, 15 Apr 2010 12:48:19 +0000 Subject: [PATCH] see #5 - done for debian --- README | 2 +- configure.in | 26 ++++++--- debian/changelog.in | 5 ++ debian/compat | 1 + debian/control | 40 +++++++++++++ debian/copyright | 26 +++++++++ debian/dirs | 0 debian/docs | 2 + debian/libxml-cxx-dev.dirs | 2 + debian/libxml-cxx-dev.install | 6 ++ debian/libxml-cxx.dirs | 1 + debian/libxml-cxx.doc-base.EX | 20 +++++++ debian/libxml-cxx.install | 1 + debian/rules | 105 ++++++++++++++++++++++++++++++++++ debian/shlibs.local.ex | 1 + debian/watch.ex | 23 ++++++++ makefile.am | 9 ++- src/libxml-cxx.pc.in | 11 ++++ src/makefile.am | 8 +++ 19 files changed, 278 insertions(+), 11 deletions(-) create mode 100644 debian/changelog.in create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/dirs create mode 100644 debian/docs create mode 100644 debian/libxml-cxx-dev.dirs create mode 100644 debian/libxml-cxx-dev.install create mode 100644 debian/libxml-cxx.dirs create mode 100644 debian/libxml-cxx.doc-base.EX create mode 100644 debian/libxml-cxx.install create mode 100755 debian/rules create mode 100644 debian/shlibs.local.ex create mode 100644 debian/watch.ex create mode 100644 src/libxml-cxx.pc.in diff --git a/README b/README index e250fb8..68dea9b 100644 --- a/README +++ b/README @@ -24,4 +24,4 @@ Structure of the files: doc/examples: Example code (included in doxygen documentation) test: CppUnit test files - can also be taken as examples -Project URL: http://dev.swisssign.com +Project URL: https://dev.marc.waeckerlin.org/projects/libxml-cxx diff --git a/configure.in b/configure.in index bf46fd2..0695a04 100644 --- a/configure.in +++ b/configure.in @@ -7,26 +7,34 @@ DOC_DIR=doc m4_define(x_packagename, libxml-cxx) m4_define(x_major, 1) m4_define(x_minor, 0) -m4_define(x_least, 0) -AM_INIT_AUTOMAKE(x_packagename, x_major.x_minor.x_least, [marc@waeckerlin.org]) + +PACKAGENAME=x_packagename +MAJOR=x_major +MINOR=x_minor + +LEAST="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout" +for path in . .. ../..; do + if svn info $path 2>&1 > /dev/null; then + LEAST=$(LANG= svn info $path | sed -n 's/Revision: //p') + break; + fi +done + +AM_INIT_AUTOMAKE($PACKAGENAME, $MAJOR.$MINOR.$LEAST, [marc@waeckerlin.org]) # files to create AC_CONFIG_FILES(makefile src/makefile test/makefile doc/examples/makefile - doc/doxyfile doc/makefile) + doc/doxyfile doc/makefile + src/libxml-cxx.pc debian/changelog) -# copy M4 to shell -PACKAGENAME=x_packagename -MAJOR=x_major -MINOR=x_minor -LEAST=x_least AC_SUBST(MAJOR) AC_SUBST(MINOR) AC_SUBST(LEAST) # libtool versioning LIB_MAJOR=m4_eval(x_major+x_minor) -LIB_MINOR=x_least +LIB_MINOR=$LEAST LIB_LEAST=x_minor LIB_VERSION="${LIB_MAJOR}:${LIB_MINOR}:${LIB_LEAST}" AC_SUBST(LIB_VERSION) diff --git a/debian/changelog.in b/debian/changelog.in new file mode 100644 index 0000000..59fcf90 --- /dev/null +++ b/debian/changelog.in @@ -0,0 +1,5 @@ +@PACKAGE@ (@VERSION@-1) unstable; urgency=low + + * See https://dev.marc.waeckerlin.org/projects/@PACKAGE@ for changes + + -- Marc Waeckerlin Wed, 07 Apr 2010 10:23:02 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..a126017 --- /dev/null +++ b/debian/control @@ -0,0 +1,40 @@ +Source: libxml-cxx +Priority: extra +Maintainer: Marc Wäckerlin +Build-Depends: debhelper (>= 7), autotools-dev +Standards-Version: 3.8.1 +Section: libs +Homepage: https://dev.marc.waeckerlin.org/projects/libxml-cxx + +Package: libxml-cxx-dev +Section: libdevel +Architecture: any +Depends: libxml-cxx (= ${binary:Version}) +Description: C++ XML Library + This is a C++ class for reading and writing XML structures. + . + All informaton can be found in the generated doxygen project documentation. + . + Rationale: The initial idea was to map C++ data structures to XML + files for configuration files that can easily be edited by hand. + . + This library does not need any kind of C++ code parser or special pre + compiler. You can specify a schema entirly in native C++. The schema + is verified when XML is read and exceptions are thrown when the XML to + be parse is invalid. Exceptions specify exactly the location and + reason of the problem, so that the editor of the XML file can easily + find and correct the problem. + . + C++ classes can inherit xml::Serialize and become serializable this + way. All you need to do is to overwrite one single method, where you + declare XML tag names for the class name and for all members. + . + (More rationale: See also "related Pages" in the doxygen project documentation) + . + Structure of the files: + src: The source code of the library + doc/html: Doxygen documentation oft the library usage + doc/examples: Example code (included in doxygen documentation) + test: CppUnit test files - can also be taken as examples + . + Project URL: https://dev.marc.waeckerlin.org/projects/libxml-cxx diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..5f11668 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,26 @@ +This package was debianized by Marc Wäckerlin on +Wed, 07 Apr 2010 10:23:02 +0200. + +It was downloaded from https://dev.marc.waeckerlin.org/projects/proxyface + +Upstream Author(s): + + Marc Wäckerlin + +Copyright: + + Marc Wäckerlin + +License: + + LGPL version 3 + +The Debian packaging is: + + Copyright (C) 2010 Marc Wäckerlin + +and is licensed under the GPL version 3, +see `/usr/share/common-licenses/GPL-3'. + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..e69de29 diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..50bd824 --- /dev/null +++ b/debian/docs @@ -0,0 +1,2 @@ +NEWS +README diff --git a/debian/libxml-cxx-dev.dirs b/debian/libxml-cxx-dev.dirs new file mode 100644 index 0000000..4418816 --- /dev/null +++ b/debian/libxml-cxx-dev.dirs @@ -0,0 +1,2 @@ +usr/lib +usr/include diff --git a/debian/libxml-cxx-dev.install b/debian/libxml-cxx-dev.install new file mode 100644 index 0000000..3c996c8 --- /dev/null +++ b/debian/libxml-cxx-dev.install @@ -0,0 +1,6 @@ +usr/include/* +usr/lib/lib*.a +usr/lib/lib*.so +usr/lib/pkgconfig/* +usr/lib/*.la +usr/share/pkgconfig/* diff --git a/debian/libxml-cxx.dirs b/debian/libxml-cxx.dirs new file mode 100644 index 0000000..6845771 --- /dev/null +++ b/debian/libxml-cxx.dirs @@ -0,0 +1 @@ +usr/lib diff --git a/debian/libxml-cxx.doc-base.EX b/debian/libxml-cxx.doc-base.EX new file mode 100644 index 0000000..5333865 --- /dev/null +++ b/debian/libxml-cxx.doc-base.EX @@ -0,0 +1,20 @@ +Document: proxyface +Title: Debian proxyface Manual +Author: +Abstract: This manual describes what proxyface is + and how it can be used to + manage online manuals on Debian systems. +Section: unknown + +Format: debiandoc-sgml +Files: /usr/share/doc/proxyface/proxyface.sgml.gz + +Format: postscript +Files: /usr/share/doc/proxyface/proxyface.ps.gz + +Format: text +Files: /usr/share/doc/proxyface/proxyface.text.gz + +Format: HTML +Index: /usr/share/doc/proxyface/html/index.html +Files: /usr/share/doc/proxyface/html/*.html diff --git a/debian/libxml-cxx.install b/debian/libxml-cxx.install new file mode 100644 index 0000000..d0dbfd1 --- /dev/null +++ b/debian/libxml-cxx.install @@ -0,0 +1 @@ +usr/lib/lib*.so.* diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..6f128b8 --- /dev/null +++ b/debian/rules @@ -0,0 +1,105 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) +CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) +else +CROSS= --build $(DEB_BUILD_GNU_TYPE) +endif + + + + +# shared library versions, option 1 +version=2.0.5 +major=2 +# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so +#version=`ls src/.libs/lib*.so.* | \ +# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'` +#major=`ls src/.libs/lib*.so.* | \ +# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'` + +config.status: configure + dh_testdir +ifneq "$(wildcard /usr/share/misc/config.sub)" "" + cp -f /usr/share/misc/config.sub config.sub +endif +ifneq "$(wildcard /usr/share/misc/config.guess)" "" + cp -f /usr/share/misc/config.guess config.guess +endif + ./configure $(CROSS) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" +# does not work: LDFLAGS="-Wl,-z,defs" + + +build: build-stamp +build-stamp: config.status + dh_testdir + $(MAKE) + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + [ ! -f [Mm]akefile ] || $(MAKE) distclean + rm -f config.sub config.guess + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + $(MAKE) prefix=$(CURDIR)/debian/tmp/usr install + + +# Build architecture-independent files here. +binary-indep: install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_installexamples + dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron +# dh_installinfo +# dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_python + dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/debian/shlibs.local.ex b/debian/shlibs.local.ex new file mode 100644 index 0000000..2566e8d --- /dev/null +++ b/debian/shlibs.local.ex @@ -0,0 +1 @@ +libproxyface 1.0.34 proxyface (>> 1.0.34-0), proxyface (<< 1.0.34-99) diff --git a/debian/watch.ex b/debian/watch.ex new file mode 100644 index 0000000..9e3713b --- /dev/null +++ b/debian/watch.ex @@ -0,0 +1,23 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +# Uncomment to examine a Webpage +# +#http://www.example.com/downloads.php proxyface-(.*)\.tar\.gz + +# Uncomment to examine a Webserver directory +#http://www.example.com/pub/proxyface-(.*)\.tar\.gz + +# Uncommment to examine a FTP server +#ftp://ftp.example.com/pub/proxyface-(.*)\.tar\.gz debian uupdate + +# Uncomment to find new files on sourceforge, for devscripts >= 2.9 +# http://sf.net/proxyface/proxyface-(.*)\.tar\.gz + +# Uncomment to find new files on GooglePages +# http://example.googlepages.com/foo.html proxyface-(.*)\.tar\.gz diff --git a/makefile.am b/makefile.am index 404f3b7..aaad9e8 100644 --- a/makefile.am +++ b/makefile.am @@ -15,7 +15,14 @@ SUBDIRS = @SRC_DIR@ @TST_DIR@ @DOC_DIR@ nobase_include_HEADERS = -EXTRADIST = bootstrap.sh +EXTRA_DIST = bootstrap.sh debian + +DISTCLEANFILES = debian/changelog + +deb: dist + tar xzvf @PACKAGE@-@VERSION@.tar.gz + cd @PACKAGE@-@VERSION@ && dpkg-buildpackage + rm -rf @PACKAGE@-@VERSION@ infosdir = ${pkgdatadir} infos_DATA = AUTHORS NEWS README COPYING INSTALL ChangeLog # @PACKAGENAME@.spec diff --git a/src/libxml-cxx.pc.in b/src/libxml-cxx.pc.in new file mode 100644 index 0000000..37a276f --- /dev/null +++ b/src/libxml-cxx.pc.in @@ -0,0 +1,11 @@ +prefix=@PACKAGENAME@ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: @PACKAGENAME@ +Description: C++ wrappers around pcsc-lite, cryptoki, openssh +Version: @VERSION@ +Libs: -L${libdir} -lxml-cxx +Libs.private: +Cflags: -I${includedir} diff --git a/src/makefile.am b/src/makefile.am index 1f4cb63..604c7e4 100644 --- a/src/makefile.am +++ b/src/makefile.am @@ -5,10 +5,18 @@ ## 1 2 3 4 5 6 7 8 ## 45678901234567890123456789012345678901234567890123456789012345678901234567890 +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libxml-cxx.pc +pkgconfig2dir = $(datarootdir)/pkgconfig +pkgconfig2_DATA = $(pkgconfig_DATA) + +EXTRA_DIST = $(pkgconfig_DATA).in + AM_CXXFLAGS += -I ${top_srcdir}/src lib_LTLIBRARIES = libxml-cxx.la nobase_include_HEADERS = xml-cxx/xml.hxx xml-cxx/any.hxx libxml_cxx_la_SOURCES = xml.cxx +DISTCLEANFILES = $(pkgconfig_DATA) MAINTAINERCLEANFILES = makefile.in