From 1f00d0e08794d1a7fc3d431d0b4a688d4dc654e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Thu, 8 Apr 2010 12:41:16 +0000 Subject: [PATCH] new target make deb to create debian package, refs #1 --- configure.in | 28 ++++++---- debian/changelog.in | 5 ++ debian/compat | 1 + debian/control | 27 +++++++++ debian/copyright | 26 +++++++++ debian/dirs | 0 debian/docs | 2 + debian/libpcscxx-dev.dirs | 2 + debian/libpcscxx-dev.install | 6 ++ debian/libpcscxx.dirs | 1 + debian/libpcscxx.doc-base.EX | 20 +++++++ debian/libpcscxx.install | 1 + debian/rules | 105 +++++++++++++++++++++++++++++++++++ debian/shlibs.local.ex | 1 + debian/watch.ex | 23 ++++++++ makefile.am | 9 ++- src/libpcscxx.pc.in | 11 ++++ src/makefile.am | 10 +++- 18 files changed, 264 insertions(+), 14 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/libpcscxx-dev.dirs create mode 100644 debian/libpcscxx-dev.install create mode 100644 debian/libpcscxx.dirs create mode 100644 debian/libpcscxx.doc-base.EX create mode 100644 debian/libpcscxx.install create mode 100755 debian/rules create mode 100644 debian/shlibs.local.ex create mode 100644 debian/watch.ex create mode 100644 src/libpcscxx.pc.in diff --git a/configure.in b/configure.in index f8a18d4..58589ee 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,5 @@ -# init +# $Id$ + AC_INIT([README]) SRC_DIR=src TST_DIR=test @@ -7,26 +8,29 @@ DOC_DIR=doc m4_define(x_packagename, libpcscxx) m4_define(x_major, 0) m4_define(x_minor, 0) -m4_define(x_least, 0) -AM_INIT_AUTOMAKE(x_packagename, x_major.x_minor.x_least, [marc@waeckerlin.org]) - -# files to create -AC_CONFIG_FILES(makefile - src/makefile test/makefile - doc/doxyfile doc/examples/makefile doc/makefile) - -# copy M4 to shell PACKAGENAME=x_packagename MAJOR=x_major MINOR=x_minor -LEAST=x_least + +LEAST='$Revision$' +LEAST=${LEAST#* } +LEAST=${LEAST% *} + +AM_INIT_AUTOMAKE($PACKAGENAME, $MAJOR.$MINOR.$LEAST, [marc@waeckerlin.org]) + +# files to create +AC_CONFIG_FILES([makefile + src/makefile test/makefile + doc/doxyfile doc/examples/makefile doc/makefile + src/libpcscxx.pc debian/changelog]) + 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..4ebdaa7 --- /dev/null +++ b/debian/control @@ -0,0 +1,27 @@ +Source: libpcscxx +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/libpcscxx + +Package: libpcscxx-dev +Section: libdevel +Architecture: any +Depends: libpcscxx (= ${binary:Version}) +Description: C++ Wrapper around PCSClite, Cryptoki, OpenSSL + C++ wrappers around the ugly C-Interfaces of pcsc-lite, cryptoki and + open-ssl. + . + For more details, see: https://dev.marc.waeckerlin.org/projects/libpcscxx + +Package: libpcscxx +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: C++ Wrapper around PCSClite, Cryptoki, OpenSSL + C++ wrappers around the ugly C-Interfaces of pcsc-lite, cryptoki and + open-ssl. + . + For more details, see: https://dev.marc.waeckerlin.org/projects/libpcscxx 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/libpcscxx-dev.dirs b/debian/libpcscxx-dev.dirs new file mode 100644 index 0000000..4418816 --- /dev/null +++ b/debian/libpcscxx-dev.dirs @@ -0,0 +1,2 @@ +usr/lib +usr/include diff --git a/debian/libpcscxx-dev.install b/debian/libpcscxx-dev.install new file mode 100644 index 0000000..3c996c8 --- /dev/null +++ b/debian/libpcscxx-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/libpcscxx.dirs b/debian/libpcscxx.dirs new file mode 100644 index 0000000..6845771 --- /dev/null +++ b/debian/libpcscxx.dirs @@ -0,0 +1 @@ +usr/lib diff --git a/debian/libpcscxx.doc-base.EX b/debian/libpcscxx.doc-base.EX new file mode 100644 index 0000000..5333865 --- /dev/null +++ b/debian/libpcscxx.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/libpcscxx.install b/debian/libpcscxx.install new file mode 100644 index 0000000..d0dbfd1 --- /dev/null +++ b/debian/libpcscxx.install @@ -0,0 +1 @@ +usr/lib/lib*.so.* diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..e7a4a62 --- /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 b748962..a7ee264 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/libpcscxx.pc.in b/src/libpcscxx.pc.in new file mode 100644 index 0000000..192911d --- /dev/null +++ b/src/libpcscxx.pc.in @@ -0,0 +1,11 @@ +prefix=@PREFIX@ +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} -lpcscxx +Libs.private: +Cflags: -I${includedir} diff --git a/src/makefile.am b/src/makefile.am index 5143677..2d21d56 100644 --- a/src/makefile.am +++ b/src/makefile.am @@ -8,6 +8,13 @@ include_HEADERS = pcsc.hxx cryptoki.hxx openssl.hxx cryptaux.hxx pkcs11dir = ${includedir}/pkcs11 +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libpcscxx.pc +pkgconfig2dir = $(datarootdir)/pkgconfig +pkgconfig2_DATA = $(pkgconfig_DATA) + +EXTRA_DIST = $(pkgconfig_DATA).in $(shell ls -1 *.doc) + lib_LTLIBRARIES = libcryptoki++.la libcryptoki___la_SOURCES = cryptoki.cxx cryptoki.hxx @@ -16,5 +23,6 @@ libcryptoki___la_LIBADD = -lssl clean-local: -rm -r ${QMAKE_TARGET}.app -CLEANFILES = +CLEANFILES = +DISTCLEANFILES = $(pkgconfig_DATA) MAINTAINERCLEANFILES = makefile.in