Start debianization

This commit is contained in:
Magnus Henoch 2004-04-02 21:54:14 +00:00 committed by Kirill A. Korinskiy
parent 4123d9b13d
commit 7ba3742c28
8 changed files with 207 additions and 0 deletions

7
debian/changelog vendored Normal file
View File

@ -0,0 +1,7 @@
emacs-jabber (0.5) unstable; urgency=low
* Initial debianization.
-- Magnus Henoch <mange@freemail.hu> Fri, 2 Apr 2004 23:04:36 +0200

17
debian/control vendored Normal file
View File

@ -0,0 +1,17 @@
Source: emacs-jabber
Section: net
Priority: optional
Maintainer: Magnus Henoch <mange@freemail.hu>
Build-Depends: debhelper (>> 3.0.0), texinfo
Standards-Version: 3.6.1
Package: emacs-jabber
Architecture: all
Depends: emacs21 | xemacs21, gnus (>= 5.10)
Description: Jabber client for Emacs/XEmacs
jabber.el (emacs-jabber) is a Jabber client for Emacs and XEmacs.
.
Jabber is an open instant messaging system. For more information on
Jabber, see http://www.jabber.org/.
.
Homepage: http://emacs-jabber.sourceforge.net/

21
debian/emacsen-install.in vendored Normal file
View File

@ -0,0 +1,21 @@
#! /bin/bash -e
# /usr/lib/emacsen-common/packages/install/emacs-jabber
# Written by Jim Van Zandt <jrv@vanzandt.mv.com>, borrowing heavily
# from the install scripts for gettext by Santiago Vila
# <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
#
# Patched by Roland Mas <lolando@debian.org> to add support for lists
# of flavor-dependently included/excluded files
FLAVOR=$1
STAMPFILE=jabber.elc
PACKAGE=emacs-jabber
# INCLUDED_emacs20=""
# INCLUDED_emacs21=""
# INCLUDED_xemacs21=""
# EXCLUDED_emacs20=""
# EXCLUDED_emacs21=""
# EXCLUDED_xemacs21=""

86
debian/emacsen-install.template vendored Normal file
View File

@ -0,0 +1,86 @@
eval included_here=\$$(echo INCLUDED_$FLAVOR)
eval excluded_here=\$$(echo EXCLUDED_$FLAVOR)
included_all=$(for i in ${!INCLUDED_*} ; do
eval echo \$$i
done | sort -u)
excluded_all=$(for i in ${!EXCLUDED_*} ; do
eval echo \$$i
done | sort -u)
if [ ${FLAVOR} = emacs ]; then exit 0; fi
# 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/info/${PACKAGE}.info.gz
fi
LOG=`tempfile -pelc_ -s.log -m644`
ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
if test -e "${ELCDIR}/${STAMPFILE}"; then
echo "${PACKAGE} files already compiled in ${ELCDIR}."
exit
fi
echo install/${PACKAGE}: Handling ${FLAVOR}, logged in ${LOG}
if [ -z "$FLAGS" ] ; then
FLAGS="-q -no-site-file --no-site-file -batch -l path.el -f batch-byte-compile"
fi
install -m 755 -d ${ELCDIR}
cd ${ELDIR}
# Now to compute the list of files to install...
FILES=$(ls -1 *.el)
# Here we have all of them
PATTERN=""
for i in $included_all $excluded_all ; do
[ ! -z "$PATTERN" ] && PATTERN="${PATTERN}\|"
PATTERN="${PATTERN}^$i\$"
done
FILES2=$FILES
if [ ! -z "$PATTERN" ] ; then
FILES=$(for i in $FILES2 ; do echo $i | grep -v $PATTERN || true ; done)
fi
# Here we only have those not explicitly included or excluded by any flavour
FILES="$FILES $included_here"
# Here we also have those included for the current flavour
for i in $excluded_all ; do
include_i="yes"
for j in $excluded_here ; do
[ $i = $j ] && include_i="no"
done
[ $include_i = "yes" ] && FILES="$FILES $i"
done
# And now we have those excluded by other flavours but not the current one
FILES=$(for i in $FILES ; do echo $i ; done | sort -u)
# And now for my last trick... The list is now uniquified!
cp ${FILES} ${ELCDIR}
cd ${ELCDIR}
cat << EOF > path.el
(setq load-path (cons "." load-path) byte-compile-warnings nil)
EOF
if test "${APPEND_LOAD_PATH}" != ""
then
cat << EOF >> path.el
(setq load-path (append ${APPEND_LOAD_PATH} load-path))
EOF
fi
echo ${FLAVOR} ${FLAGS} ${FILES} >> ${LOG}
${FLAVOR} ${FLAGS} ${FILES} >> ${LOG} &> ${LOG}
rm -f *.el path.el
exit 0

5
debian/emacsen-remove.in vendored Normal file
View File

@ -0,0 +1,5 @@
#!/bin/sh -e
# /usr/lib/emacsen-common/packages/remove/emacs-jabber
FLAVOR=$1
PACKAGE=emacs-jabber

10
debian/emacsen-remove.template vendored Normal file
View File

@ -0,0 +1,10 @@
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/info/${PACKAGE}.info.gz
fi
echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
fi

17
debian/emacsen-startup vendored Normal file
View File

@ -0,0 +1,17 @@
;; -*-emacs-list-*-
;;
;; Emacs startup file for jabber.el as packaged for Debian
(if (not (file-exists-p "/usr/share/emacs/site-lisp/emacs-jabber"))
(message
"Package emacs-jabber removed but not purged. Skipping setup.")
(debian-pkg-add-load-path-item
(concat "/usr/share/" (symbol-name flavor) "/site-lisp/emacs-jabber"))
;; Make sure that the uncompiled files are also in the load-path, near the
;; end. This is for moving point to the code when view help.
(setq load-path
(nconc load-path (list "/usr/share/emacs/site-lisp/emacs-jabber")))
(require 'jabber))

44
debian/rules vendored Executable file
View File

@ -0,0 +1,44 @@
#!/usr/bin/make -f
export DH_COMPAT=4
build: build-stamp
build-stamp:
dh_testdir
makeinfo jabber.texi
makeinfo --html -o html jabber.texi
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
rm -rf html
dh_clean
binary: binary-arch binary-indep
binary-arch:
binary-indep: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs usr/share/emacs/site-lisp/emacs-jabber
install -m 644 *.el debian/emacs-jabber/usr/share/emacs/site-lisp/emacs-jabber
cat debian/emacsen-install.in debian/emacsen-install.template > debian/emacsen-install
cat debian/emacsen-remove.in debian/emacsen-remove.template > debian/emacsen-remove
dh_installemacsen
dh_installdocs html README
dh_installinfo jabber.info
dh_installchangelogs
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
.PHONY: binary-indep binary-arch binary clean build