Re: Packaging perl modules / new package TimeDate
Hi,
>>"Christian" == Christian Leutloff <leutloff@sundancer.oche.de> writes:
Christian> Can you send me your rules file? What do you want to do
Christian> with the cpan-package? Complete automatic release? Where do
Christian> you get the description from?
I think I want the person trying to create the cpan package
create a control file; the package name and description, which is the
hardest thing for the script to make up, shall then be human
crafted. So, given a control file and an {un?}packed cpan tarball,
one should get a debian package. I would think that a control file
and a tarball in packagename.orig.tar.gz which contains pristine
upstream sources may work best; one may then use code from
dpkg-source to open the tarball. (Darn, I am getting interested in
this little project).
COMMON_DOC_FILENAMES := INSTALL README [Cc][Hh][Aa][Nn][Gg][Ee][Ll][Oo][Gg]
DOC_FILES = $(shell for file in $(COMMON_DOC_FILENAMES); do\
if test -f $$file; then echo " $$file " ; fi \
done )
HTML_FILES = $(shell find . -type f -name *.html)
Something like the above can handle most common files that
need to be installed in /usr/doc/<package name>/ I'm including a
current rules file that shows some of the other things one may do
with CPAN packages.
Comments appreciated.
>> I think we _should_ consider a Perl directory just like we have a
>> TeX directory, since the size of CPAN is likely to be of the same
>> order as CTAN ...
Christian> there is /usr/lib/perl5
I meant the ftp directory heirarchy, not on the file system.
manoj
--
"Sometimes I wonder if men and women really suit each other. Perhaps
they should live next door and just visit now and then." Katherine
Hepburn
Manoj Srivastava <srivasta@acm.org> <http://www.datasync.com/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05 CC 2D 27 12 1D F5 E8 6E
======================================================================
#! /usr/bin/make -f
############################ -*- Mode: Makefile -*- ###########################
## rules ---
## Author : Manoj Srivastava ( srivasta@tiamat.datasync.com )
## Created On : Wed Nov 20 16:07:20 1996
## Created On Node : tiamat.datasync.com
## Last Modified By : Manoj Srivastava
## Last Modified On : Wed Nov 5 11:46:00 1997
## Last Machine Used: tiamat.datasync.com
## Update Count : 29
## Status : Unknown, Use with caution!
## HISTORY :
## Description :
##
###############################################################################
FILES_TO_CLEAN = debian/files debian/buildinfo debian/substvars
STAMPS_TO_CLEAN = stamp-configure stamp-build stamp-binary
DIRS_TO_CLEAN = debian/tmp
thisdir=$(shell pwd)
install_file= install -p -o root -g root -m 644
install_program= install -p -o root -g root -m 755
make_directory= install -p -d -o root -g root -m 755
deb_rule = $(MAKE) -f $(thisdir)/debian/rules
package = $(shell grep Source debian/control | sed 's/^Source: //')
version= $(shell head -1 debian/changelog | \
perl -nle 'm/\S+\s+\((\S+)\)/ && print $$1')
PRIVLIB := $(shell perl -e 'use Config; print "$$Config{'privlibexp'}\n";')
ARCHLIB := $(shell perl -e 'use Config; print "$$Config{'archlibexp'}\n";')
DOCDIR := debian/tmp/usr/doc/$(package)
FILES_TO_COMPRESS= $(DOCDIR)/README.* $(DOCDIR)/changelog.debian
all build: configure stamp-build
stamp-build:
# Builds the binary package.
$(checkdir)
-test ! -f stamp-configure && $(MAKE) -f debian/rules configure
$(MAKE)
dpkg -l perl 'libc*' make dpkg-dev | \
awk '$$1 == "ii" { printf("%s-%s\n", $$2, $$3) }' > \
debian/buildinfo
touch stamp-build
configure: stamp-configure Makefile
stamp-configure Makefile:
$(checkdir)
-test ! -f stamp-configure && \
perl Makefile.PL && touch stamp-configure
clean:
# Undoes the effect of `make -f debian/rules build'.
$(checkdir)
rm -f $(FILES_TO_CLEAN) $(STAMPS_TO_CLEAN)
rm -rf $(DIRS_TO_CLEAN)
-test -f Makefile && $(MAKE) realclean
rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o \
-name '*~' -o -name '*.bak' -o -name '#*#' -o \
-name '.*.orig' -o -name '.*.rej' -o -name '.SUMS' -o \
-size 0 \) -print` TAGS
binary: binary-arch binary-indep
binary-arch: build
binary-indep: build stamp-binary
stamp-binary:
# Makes a binary package.
test root = "`whoami`" || (echo need root priviledges; exit 1)
$(checkdir)
test -f stamp-build || $(deb_rule) build
rm -rf debian/tmp
$(make_directory) debian/tmp
chmod g-s debian/tmp
$(make_directory) debian/tmp/DEBIAN
$(make_directory) debian/tmp/$(PRIVLIB)
$(make_directory) debian/tmp/$(ARCHLIB)
$(make_directory) debian/tmp/usr/man/man3
$(make_directory) debian/tmp/usr/lib/menu
$(make_directory) $(DOCDIR)
$(install_file) debian/changelog $(DOCDIR)/changelog.debian
$(install_file) README $(DOCDIR)/README
$(install_file) debian/README $(DOCDIR)/README.debian
$(install_file) debian/buildinfo $(DOCDIR)/buildinfo.Debian
$(install_file) debian/doc.html $(DOCDIR)/index.html
$(install_file) debian/menuentry debian/tmp/usr/lib/menu/$(package)
(cd doc; tar cf - .) | ( cd $(DOCDIR)/; tar xf - )
-gzip -9qfr $(FILES_TO_COMPRESS)
# Make sure the copyright file is not compressed
$(install_file) debian/copyright $(DOCDIR)/copyright
$(MAKE) PREFIX=$(thisdir)/debian/tmp/usr \
INSTALLDIRS=perl \
INSTALLMAN1DIR=$(thisdir)/debian/tmp/usr/man/man1 \
INSTALLMAN3DIR=$(thisdir)/debian/tmp/usr/man/man3 \
pure_install
-gzip -9qf debian/tmp/usr/man/man3/*
-rm -rf debian/tmp/usr/lib/perl5/i386-linux
$(install_program) debian/preinst debian/tmp/DEBIAN/preinst
$(install_program) debian/postinst debian/tmp/DEBIAN/postinst
$(install_program) debian/postrm debian/tmp/DEBIAN/postrm
dpkg-gencontrol
chmod -R u+w debian/tmp/usr/
chown -R root.root debian/tmp/
dpkg-deb --build debian/tmp ..
touch stamp-binary
define checkdir
test -f CGI/BasePlus.pm -a -f debian/rules
endef
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
.PHONY: binary binary-arch binary-indep clean
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: