From 9e0daef671b239799633e842775a3d28229e4a38 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Mon, 14 Jul 2008 22:39:53 +0200 Subject: [PATCH] Add Debian packaging --- debian/changelog | 5 +++ debian/compat | 1 + debian/control | 12 +++++++ debian/copyright | 26 ++++++++++++++ debian/emacsen-install | 45 +++++++++++++++++++++++ debian/emacsen-remove | 15 ++++++++ debian/emacsen-startup | 27 ++++++++++++++ debian/rules | 81 ++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 212 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/emacsen-install create mode 100644 debian/emacsen-remove create mode 100644 debian/emacsen-startup create mode 100755 debian/rules diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..ced907e --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +eweouz (0.1) unstable; urgency=low + + * Initial Release. + + -- Tollef Fog Heen Mon, 14 Jul 2008 22:05:57 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..a73f85f --- /dev/null +++ b/debian/control @@ -0,0 +1,12 @@ +Source: eweouz +Section: unknown +Priority: optional +Maintainer: Tollef Fog Heen +Build-Depends: debhelper (>= 5), autotools-dev, emacs22 | emacsen, libedataserver1.2-dev, libebook1.2-dev, libgconf2-dev, libglib2.0-dev +Standards-Version: 3.7.2 + +Package: eweouz +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..a707cb5 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,26 @@ +Upstream Author: + + Tollef Fog Heen + +Copyright: + + Copyright © 2005,2007,2008 Tollef Fog Heen + +License: + + This package is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. diff --git a/debian/emacsen-install b/debian/emacsen-install new file mode 100644 index 0000000..cc1084d --- /dev/null +++ b/debian/emacsen-install @@ -0,0 +1,45 @@ +#! /bin/sh -e +# /usr/lib/emacsen-common/packages/install/eweouz + +# Written by Jim Van Zandt , borrowing heavily +# from the install scripts for gettext by Santiago Vila +# and octave by Dirk Eddelbuettel . + +FLAVOR=$1 +PACKAGE=eweouz + +if [ ${FLAVOR} = emacs ]; then exit 0; fi + +echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} + +#FLAVORTEST=`echo $FLAVOR | cut -c-6` +#if [ ${FLAVORTEST} = xemacs ] ; then +# SITEFLAG="-no-site-file" +#else +# SITEFLAG="--no-site-file" +#fi +FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" + +ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} +ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} + +# Install-info-altdir does not actually exist. +# Maybe somebody will write it. +if test -x /usr/sbin/install-info-altdir; then + echo install/${PACKAGE}: install Info links for ${FLAVOR} + install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz +fi + +install -m 755 -d ${ELCDIR} +cd ${ELDIR} +FILES=`echo *.el` +cp ${FILES} ${ELCDIR} +cd ${ELCDIR} + +cat << EOF > path.el +(setq load-path (cons "." load-path) byte-compile-warnings nil) +EOF +${FLAVOR} ${FLAGS} ${FILES} +rm -f *.el path.el + +exit 0 diff --git a/debian/emacsen-remove b/debian/emacsen-remove new file mode 100644 index 0000000..ff2f26c --- /dev/null +++ b/debian/emacsen-remove @@ -0,0 +1,15 @@ +#!/bin/sh -e +# /usr/lib/emacsen-common/packages/remove/eweouz + +FLAVOR=$1 +PACKAGE=eweouz + +if [ ${FLAVOR} != emacs ]; then + if test -x /usr/sbin/install-info-altdir; then + echo remove/${PACKAGE}: removing Info links for ${FLAVOR} + install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/share/info/eweouz.info.gz + fi + + echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} + rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} +fi diff --git a/debian/emacsen-startup b/debian/emacsen-startup new file mode 100644 index 0000000..22b3e3b --- /dev/null +++ b/debian/emacsen-startup @@ -0,0 +1,27 @@ +;; -*-emacs-lisp-*- +;; +;; Emacs startup file, e.g. /etc/emacs/site-start.d/50eweouz.el +;; for the Debian eweouz package +;; +;; Originally contributed by Nils Naumann +;; Modified by Dirk Eddelbuettel +;; Adapted for dh-make by Jim Van Zandt + +;; The eweouz package follows the Debian/GNU Linux 'emacsen' policy and +;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, +;; xemacs19, emacs20, xemacs20...). The compiled code is then +;; installed in a subdirectory of the respective site-lisp directory. +;; We have to add this to the load-path: +(let ((package-dir (concat "/usr/share/" + (symbol-name flavor) + "/site-lisp/eweouz"))) +;; If package-dir does not exist, the eweouz package must have +;; removed but not purged, and we should skip the setup. + (when (file-directory-p package-dir) + (setq load-path (cons package-dir load-path)) + (autoload 'eweouz "eweouz" + "Eweouz -- look up addresses in evolution-data-server" t) + (autoload 'eweouz-complete "eweouz" + "Eweouz -- look up addresses in evolution-data-server (completion function)" + t))) + diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..6e87d5b --- /dev/null +++ b/debian/rules @@ -0,0 +1,81 @@ +#! /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) + + +build-$(DEB_BUILD_GNU_TYPE)/config.status: configure + dh_testdir + # Add here commands to configure the package. +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 + mkdir build-$(DEB_BUILD_GNU_TYPE) + cd build-$(DEB_BUILD_GNU_TYPE) && ../configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" --with-lispdir=\$${datarootdir}/emacs/site-lisp/eweouz + +build: build-stamp +build-stamp: build-$(DEB_BUILD_GNU_TYPE)/config.status + dh_testdir + + $(MAKE) -C build-$(DEB_BUILD_GNU_TYPE) + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + rm -rf build-$(DEB_BUILD_GNU_TYPE) + rm -f config.sub config.guess + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/eweouz. + $(MAKE) -C build-$(DEB_BUILD_GNU_TYPE) DESTDIR=$(CURDIR)/debian/eweouz install + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_installemacsen + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install -- 2.39.5