summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-04-16 23:34:08 +0100
committerCarl Hetherington <cth@carlh.net>2016-04-16 23:34:08 +0100
commitbde215ea2c306bd011a6ccd1d5ba5f3002288dc5 (patch)
treef3d3e876169aeddc90ef0afe39ba6bddbfe5d643
parent5428ba193aff7b55dcc4b31ee92fd40ecea591f5 (diff)
Builds .debs.
-rw-r--r--.gitignore2
-rwxr-xr-xdebian/build6
-rw-r--r--debian/control20
-rw-r--r--debian/init.d.ex166
-rw-r--r--debian/libcxml-dev.install7
-rw-r--r--debian/libcxml.cron.d.ex4
-rw-r--r--debian/libcxml.default.ex10
-rw-r--r--debian/libcxml.doc-base.EX20
-rw-r--r--debian/menu.ex2
-rw-r--r--debian/postinst.ex39
-rwxr-xr-xdebian/rules15
-rw-r--r--wscript4
12 files changed, 35 insertions, 260 deletions
diff --git a/.gitignore b/.gitignore
index 16c1215..c1a2cff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
.lock-waf*
-build
+build/
core
*~
*.pyc
diff --git a/debian/build b/debian/build
new file mode 100755
index 0000000..7ebcb16
--- /dev/null
+++ b/debian/build
@@ -0,0 +1,6 @@
+#!/bin/bash
+#git clean -i
+./waf dist
+version=`cat wscript | grep VERSION | head -n 1 | awk '{print $3;}' | sed -e "s/'//g"`
+mv libcxml-$version.tar.bz2 ../libcxml_$version.orig.tar.bz2
+dpkg-buildpackage -us -uc
diff --git a/debian/control b/debian/control
index 6a1e0fa..85a1c16 100644
--- a/debian/control
+++ b/debian/control
@@ -1,22 +1,22 @@
Source: libcxml
Priority: optional
Maintainer: Carl Hetherington <cth@carlh.net>
-Build-Depends: debhelper (>= 9)
+Build-Depends: debhelper (>= 9), pkg-config, python
Standards-Version: 3.9.6
Section: libs
-Homepage: <insert the upstream URL, if relevant>
-#Vcs-Git: git://anonscm.debian.org/collab-maint/libcxml.git
-#Vcs-Browser: https://anonscm.debian.org/gitweb/?p=collab-maint/libcxml.git;a=summary
+Homepage: http://carlh.net/libdcp
+Vcs-Git: git://git.carlh.net/git/libdcp.git
+Vcs-Browser: http://git.carlh.net/gitweb/?p=libcxml.git
Package: libcxml-dev
Section: libdevel
Architecture: any
-Depends: libcxmlBROKEN (= ${binary:Version}), ${misc:Depends}
-Description: <insert up to 60 chars description>
- <insert long description, indented with spaces>
+Depends: libcxml (= ${binary:Version}), ${misc:Depends}
+Description: Simple helper library for parsing XML with libxml++ (development files)
+ A small library which makes code to parse XML slightly less verbose.
-Package: libcxmlBROKEN
+Package: libcxml
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: <insert up to 60 chars description>
- <insert long description, indented with spaces>
+Description: Simple helper library for parsing XML with libxml++
+ A small library which makes code to parse XML slightly less verbose.
diff --git a/debian/init.d.ex b/debian/init.d.ex
deleted file mode 100644
index cbafbab..0000000
--- a/debian/init.d.ex
+++ /dev/null
@@ -1,166 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides: libcxml
-# Required-Start: $local_fs $network $remote_fs $syslog
-# Required-Stop: $local_fs $network $remote_fs $syslog
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: <Enter a short description of the software>
-# Description: <Enter a long description of the software>
-# <...>
-# <...>
-### END INIT INFO
-
-# Author: Carl Hetherington <cth@carlh.net>
-
-# Do NOT "set -e"
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="libcxml"
-NAME=libcxml
-DAEMON=/usr/sbin/libcxml
-DAEMON_ARGS=""
-PIDFILE=/var/run/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-
-# Exit if the package is not installed
-[ -x "$DAEMON" ] || exit 0
-
-# Read configuration variable file if it is present
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-# Load the VERBOSE setting and other rcS variables
-. /lib/init/vars.sh
-
-# Define LSB log_* functions.
-# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
-# and status_of_proc is working.
-. /lib/lsb/init-functions
-
-#
-# Function that starts the daemon/service
-#
-do_start()
-{
- # Return
- # 0 if daemon has been started
- # 1 if daemon was already running
- # 2 if daemon could not be started
- start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
- || return 1
- start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
- $DAEMON_ARGS \
- || return 2
- # The above code will not work for interpreted scripts, use the next
- # six lines below instead (Ref: #643337, start-stop-daemon(8) )
- #start-stop-daemon --start --quiet --pidfile $PIDFILE --startas $DAEMON \
- # --name $NAME --test > /dev/null \
- # || return 1
- #start-stop-daemon --start --quiet --pidfile $PIDFILE --startas $DAEMON \
- # --name $NAME -- $DAEMON_ARGS \
- # || return 2
-
- # Add code here, if necessary, that waits for the process to be ready
- # to handle requests from services started subsequently which depend
- # on this one. As a last resort, sleep for some time.
-}
-
-#
-# Function that stops the daemon/service
-#
-do_stop()
-{
- # Return
- # 0 if daemon has been stopped
- # 1 if daemon was already stopped
- # 2 if daemon could not be stopped
- # other if a failure occurred
- start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
- RETVAL="$?"
- [ "$RETVAL" = 2 ] && return 2
- # Wait for children to finish too if this is a daemon that forks
- # and if the daemon is only ever run from this initscript.
- # If the above conditions are not satisfied then add some other code
- # that waits for the process to drop all resources that could be
- # needed by services started subsequently. A last resort is to
- # sleep for some time.
- start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
- [ "$?" = 2 ] && return 2
- # Many daemons don't delete their pidfiles when they exit.
- rm -f $PIDFILE
- return "$RETVAL"
-}
-
-#
-# Function that sends a SIGHUP to the daemon/service
-#
-do_reload() {
- #
- # If the daemon can reload its configuration without
- # restarting (for example, when it is sent a SIGHUP),
- # then implement that here.
- #
- start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
- return 0
-}
-
-case "$1" in
- start)
- [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
- do_start
- case "$?" in
- 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
- 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
- esac
- ;;
- stop)
- [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
- 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
- esac
- ;;
- status)
- status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
- ;;
- #reload|force-reload)
- #
- # If do_reload() is not implemented then leave this commented out
- # and leave 'force-reload' as an alias for 'restart'.
- #
- #log_daemon_msg "Reloading $DESC" "$NAME"
- #do_reload
- #log_end_msg $?
- #;;
- restart|force-reload)
- #
- # If the "reload" option is implemented then remove the
- # 'force-reload' alias
- #
- log_daemon_msg "Restarting $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1)
- do_start
- case "$?" in
- 0) log_end_msg 0 ;;
- 1) log_end_msg 1 ;; # Old process is still running
- *) log_end_msg 1 ;; # Failed to start
- esac
- ;;
- *)
- # Failed to stop
- log_end_msg 1
- ;;
- esac
- ;;
- *)
- #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
- echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
- exit 3
- ;;
-esac
-
-:
diff --git a/debian/libcxml-dev.install b/debian/libcxml-dev.install
index 61c9409..1adae82 100644
--- a/debian/libcxml-dev.install
+++ b/debian/libcxml-dev.install
@@ -1,4 +1,3 @@
-usr/include/*
-usr/lib/*/lib*.so
-usr/lib/*/pkgconfig/*
-usr/share/pkgconfig/*
+usr/include/*/*.h
+usr/lib/lib*.so
+usr/lib/pkgconfig/*
diff --git a/debian/libcxml.cron.d.ex b/debian/libcxml.cron.d.ex
deleted file mode 100644
index 86135fc..0000000
--- a/debian/libcxml.cron.d.ex
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-# Regular cron jobs for the libcxml package
-#
-0 4 * * * root [ -x /usr/bin/libcxml_maintenance ] && /usr/bin/libcxml_maintenance
diff --git a/debian/libcxml.default.ex b/debian/libcxml.default.ex
deleted file mode 100644
index 5c6b581..0000000
--- a/debian/libcxml.default.ex
+++ /dev/null
@@ -1,10 +0,0 @@
-# Defaults for libcxml initscript
-# sourced by /etc/init.d/libcxml
-# installed at /etc/default/libcxml by the maintainer scripts
-
-#
-# This is a POSIX shell fragment
-#
-
-# Additional options that are passed to the Daemon.
-DAEMON_OPTS=""
diff --git a/debian/libcxml.doc-base.EX b/debian/libcxml.doc-base.EX
deleted file mode 100644
index 07a1b5f..0000000
--- a/debian/libcxml.doc-base.EX
+++ /dev/null
@@ -1,20 +0,0 @@
-Document: libcxml
-Title: Debian libcxml Manual
-Author: <insert document author here>
-Abstract: This manual describes what libcxml is
- and how it can be used to
- manage online manuals on Debian systems.
-Section: unknown
-
-Format: debiandoc-sgml
-Files: /usr/share/doc/libcxml/libcxml.sgml.gz
-
-Format: postscript
-Files: /usr/share/doc/libcxml/libcxml.ps.gz
-
-Format: text
-Files: /usr/share/doc/libcxml/libcxml.text.gz
-
-Format: HTML
-Index: /usr/share/doc/libcxml/html/index.html
-Files: /usr/share/doc/libcxml/html/*.html
diff --git a/debian/menu.ex b/debian/menu.ex
deleted file mode 100644
index 0fed4e8..0000000
--- a/debian/menu.ex
+++ /dev/null
@@ -1,2 +0,0 @@
-?package(libcxml):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\
- title="libcxml" command="/usr/bin/libcxml"
diff --git a/debian/postinst.ex b/debian/postinst.ex
deleted file mode 100644
index 587351e..0000000
--- a/debian/postinst.ex
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-# postinst script for libcxml
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-# * <postinst> `configure' <most-recently-configured-version>
-# * <old-postinst> `abort-upgrade' <new version>
-# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-# <new-version>
-# * <postinst> `abort-remove'
-# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-# <failed-install-package> <version> `removing'
-# <conflicting-package> <version>
-# for details, see https://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
- configure)
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
- ;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/rules b/debian/rules
index 5c1cebc..6f02d89 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,7 @@
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
-#export DH_VERBOSE = 1
+export DH_VERBOSE = 1
# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
@@ -19,7 +19,7 @@ include /usr/share/dpkg/default.mk
# main packaging script based on dh7 syntax
%:
- dh $@
+ dh $@
# dh_make generated override targets
# This is example for Cmake (See https://bugs.debian.org/641051 )
@@ -27,6 +27,17 @@ include /usr/share/dpkg/default.mk
# dh_auto_configure -- \
# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
+override_dh_auto_clean:
+ ./waf clean || true
+ find -name "*.pyc" -delete
+ rm -rf build .waf* .lock-waf*
+ dh_auto_clean
+override_dh_auto_configure:
+ ./waf configure --prefix=/usr
+override_dh_auto_build:
+ ./waf
+override_dh_auto_install:
+ ./waf install -f --destdir=debian/tmp
diff --git a/wscript b/wscript
index 94a20c0..861d619 100644
--- a/wscript
+++ b/wscript
@@ -1,7 +1,7 @@
from waflib import Context
APPNAME = 'libcxml'
-VERSION = '0.15.1devel'
+VERSION = '0.15.1'
API_VERSION = '0.0.0'
def options(opt):
@@ -53,7 +53,7 @@ def configure(conf):
v = (int(s[0]) << 16) | (int(s[1]) << 8) | int(s[2])
if v >= 0x022701:
conf.env.append_value('CXXFLAGS', '-std=c++11')
-
+
def build(bld):
bld(source='libcxml.pc.in',