ICU-678 Debian GNU/Linux packaging

X-SVN-Rev: 2731
This commit is contained in:
Yves Arrouye 2000-10-19 20:58:30 +00:00
parent 0126b3446d
commit 7ecca7a335
10 changed files with 409 additions and 0 deletions

9
.gitignore vendored
View file

@ -13,6 +13,15 @@ icu4c/data/sent.brk
icu4c/data/word.brk
icu4c/data/word_th.brk
icu4c/debian
icu4c/debian/*.debhelper
icu4c/debian/*files
icu4c/debian/docs
icu4c/debian/icu
icu4c/debian/icu-data
icu4c/debian/icu-i18ndata
icu4c/debian/icu-locales
icu4c/debian/libicu16
icu4c/debian/tmp
icu4c/source/Makefile
icu4c/source/common/*.ao
icu4c/source/common/*.d

10
icu4c/debian/.cvsignore Normal file
View file

@ -0,0 +1,10 @@
*.debhelper
docs
*files
tmp
libicu16
icu
icu-locales
icu-data
icu-i18ndata

View file

@ -0,0 +1,8 @@
libicu-dev for Debian
---------------------
The documentation in /usr/share/doc/libicu-dev/docs/ provides a high-level
overview of ICU. Detailed API documentation is provided by the icu-docs
package.
-- Yves Arrouye <yves@debian.org>, Wed, 11 Oct 2000 19:37:57 -0700

9
icu4c/debian/changelog Normal file
View file

@ -0,0 +1,9 @@
icu (1.6.0.1-20001017-1) unstable; urgency=low
* Initial Release.
-- Yves Arrouye <yves@debian.org> Tue, 17 Oct 2000 10:28:17 -0700
Local variables:
mode: debian-changelog
End:

76
icu4c/debian/control Normal file
View file

@ -0,0 +1,76 @@
Source: icu
Section: libs
Priority: optional
Maintainer: Yves Arrouye <yves@debian.org>
Standards-Version: 3.1.1
Package: libicu-dev
Section: devel
Architecture: any
Depends: libicu${major} (= ${Source-Version}), libc6-dev
Suggests: icu-docs
Description: International Components for Unicode (development files)
ICU is a C++ and C library that provides robust and full-featured Unicode
support. This package contains the development files for ICU.
Package: libicu16
Section: libs
Architecture: any
Depends: ${shlibs:Depends}
Recommends: icu
Description: International Components for Unicode (libraries)
ICU is a C++ and C library that provides robust and full-featured Unicode
support. This package contains the runtime libraries for ICU. It does
not contain any of the data files needed at runtime and present in the
`icu' and `icu-locales` packages.
Package: icu
Section: admin
Architecture: any
Depends: libicu${major} (>= ${Source-Version})
Recommends: icu-locales
Description: International Components for Unicode (locale data)
ICU is a C++ and C library that provides robust and full-featured Unicode
support. The library provides calendar support, character set conversions,
language-sensitive collation, date and time formatting, support for more
than 140 locales, message catalogs and resources, message formatting,
normalization, number and currency formatting, time zones support,
transliteration, word, line and sentence breaking, etc....
.
This package contains the Unicode data, converters and aliases data,
and timezone data. It also contains the tools needed to manipulate
these data.
Package: icu-locales
Section: admin
Architecture: any
Depends: libicu${major} (>= ${Source-Version})
Description: Locale data for ICU
The locale data are used by ICU to provide localization (l10n) and
internationalization (i18n) support to ICU applications. This package
also contains break data for various languages, and transliteration data.
Package: icu-data
Priority: extra
Section: admin
Architecture: all
Depends: icu
Description: Data for ICU (source files)
These data describe the Unicode data (normative and informative), and
also all the table-based converters provided in the ICU distribution.
.
This package contains uncompiled source data. Precompiled data are in the
`libicu1' package.
Package: icu-i18ndata
Priority: extra
Section: admin
Architecture: all
Depends: icu
Description: Locale data for ICU (source files)
The locale data are used by ICU to provide localization (l10n) and
internationalization (i18n) support to ICU applications. This package
also contains break data for various languages, and transliteration data.
.
This package contains uncompiled source data. Precompiled data are in the
`icu-locales' package.

13
icu4c/debian/copyright Normal file
View file

@ -0,0 +1,13 @@
This package was debianized by Yves Arrouye <yves@debian.org> on
Fri, 15 Sep 2000 14:22:09 -0700.
It was downloaded from ICU's CVS repository, which can be accessed
anonymously through :pserver:anoncvs@oss.software.ibm.com:/usr/cvs/icu.
The CVS module is icu.
Upstream Author(s): International Business Machines (IBM) and Others.
You are free to distribute this software under the terms of the IBM Public
License Version 1.0. A copy of this license can be found in the license.html
file.

View file

@ -0,0 +1 @@
/etc/icu/@VERSION@/convrtrs.txt

View file

@ -0,0 +1,52 @@
#! /bin/sh
# postinst script for foo
#
# 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>
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see /usr/share/doc/packaging-manual/
#
# quoting from the policy:
# Any necessary prompting should almost always be confined to the
# post-installation script, and should be protected with a conditional
# so that unnecessary prompting doesn't happen if a package's
# installation fails and the `postinst' is called with `abort-upgrade',
# `abort-remove' or `abort-deconfigure'.
ICU_DATA=@datadir@/@PACKAGE@/@VERSION@
export ICU_DATA
case "$1" in
configure)
if ! -f $ICU_DATA/cnvalias.dat -o /etc/icu/convrtrs.txt -nt $ICU_DATA/cnvalias.dat
then
/usr/sbin/gencnval /etc/icu/convrtrs.txt
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 0
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

View file

@ -0,0 +1,47 @@
#! /bin/sh
# postinst script for foo
#
# 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>
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see /usr/share/doc/packaging-manual/
#
# quoting from the policy:
# Any necessary prompting should almost always be confined to the
# post-installation script, and should be protected with a conditional
# so that unnecessary prompting doesn't happen if a package's
# installation fails and the `postinst' is called with `abort-upgrade',
# `abort-remove' or `abort-deconfigure'.
case "$1" in
configure)
ldconfig
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 0
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

184
icu4c/debian/rules Executable file
View file

@ -0,0 +1,184 @@
#!/usr/bin/make -f
# ICU debian/rules that uses debhelper.
# The Debian packages for ICU are created and maintained by
# Yves Arrouye <yves@debian.org>. They are part of Debian GNU/Linux
# since the Debian woody release.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This is the debhelper compatability version to use.
export DH_COMPAT=1
# Where the source for ICU is
srcdir=source
# shared library versions, option 1
version:=$(shell sed -n 's/^[ ]*\#[ ]*define[ ]*U_ICU_VERSION[ ]*"\([^"]*\)".*/\1/p' $(srcdir)/common/unicode/utypes.h)
major:=$(shell echo $(version) | sed -e 's/\.//' -e 's/\..*//')
# 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)}'`
# Build flags
CFLAGS = -O2 # -Wall
CXXFLAGS = -O2 # -Wall
INSTALL_PROGRAM = /usr/bin/install
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
CXXFLAGS += -g
endif
ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
all: build
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
cd $(srcdir); CFLAGS='$(CFLAGS)' CXXFLAGS='$(CFLAGS)' INSTALL_PROGRAM='$(INSTALL_PROGRAM)' ./configure --prefix=/usr --mandir=/usr/share/man --with-data-packaging=files --enable-rpath=no --enable-shared --enable-static --disable-samples
touch configure-stamp
build: configure-stamp build-stamp
build-stamp:
dh_testdir
# Add here commands to compile the package.
$(MAKE) -C $(srcdir)
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
-$(MAKE) -C $(srcdir) distclean
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/tmp.
$(MAKE) -C $(srcdir) install DESTDIR=`pwd`/debian/tmp
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build some Debian files
debian/%: debian/%.in
cd source \
&& CONFIG_FILES=../$< CONFIG_HEADERS= $(SHELL) ./config.status
# Build architecture-dependent files here.
binary-arch: build install debian/icu.conffiles debian/icu.postinst
# dh_testversion
dh_testdir
dh_testroot
rm debian/tmp/usr/sbin/gentest
#
# build libicu${major} package by moving files from icu-dev
#
dh_movefiles -plibicu$(major) \
usr/lib/libicuuc.so.* \
usr/lib/libicui18n.so.* \
usr/lib/libicutoolutil.so.* \
usr/lib/libustdio.so.*
#
# build icu package by moving files from icu-dev
#
test -d debian/icu/etc/icu || \
mkdir -p debian/icu/etc/icu
mv debian/tmp/usr/share/icu/$(version)/convrtrs.txt debian/icu/etc/icu
dh_movefiles -picu \
usr/sbin \
usr/share/icu/$(version)/*.cnv \
usr/share/icu/$(version)/*.txt \
usr/share/icu/$(version)/cnvalias.dat \
usr/share/icu/$(version)/u*.dat \
usr/share/icu/$(version)/tz.dat \
usr/share/man
#
# build icu-locales package by moving files from icu-dev
#
dh_movefiles -picu-locales \
usr/share/icu/$(version)
#
# build icu-data from the source data
#
test -d debian/icu-data/usr/share/icu/${version} || \
mkdir -p debian/icu-data/usr/share/icu/${version}
install -m 644 $(srcdir)/../data/ucname.txt \
$(srcdir)/../data/*.ucm \
debian/icu-data/usr/share/icu/${version}
test -d debian/icu-data/usr/share/icu/${version}/unidata || \
mkdir -p debian/icu-data/usr/share/icu/${version}/unidata
install -m 644 $(srcdir)/../data/unidata/*.* \
debian/icu-data/usr/share/icu/${version}/unidata
unidatafile=`(cd $(srcdir)/../data; ls UnicodeData*.txt)`; cd debian/icu-data/usr/share/icu/${version} && ln -s unidata/UnicodeData.txt $$unidatafile
#
# build icu-i18ndata from the source data
#
test -d debian/icu-i18ndata/usr/share/icu/${version} || \
mkdir -p debian/icu-i18ndata/usr/share/icu/${version}
install -m 644 $(srcdir)/../data/*.txt \
$(srcdir)/../data/*.brk \
debian/icu-i18ndata/usr/share/icu/${version}
cd debian/icu-i18ndata/usr/share/icu/${version} && \
rm -f convrtrs.txt UnicodeData*.txt ucname.txt
#
# do a bit of cleanup
#
rm -rf debian/tmp/usr/sbin \
debian/tmp/usr/share/icu/${version} \
debian/tmp/usr/share/man
#
# continue to prepare packages
#
# dh_installdebconf
dh_installdocs docs
dh_installexamples $(srcdir)/samples/*
dh_installmenu
# dh_installemacsen
# dh_installpam
# dh_installinit
dh_installcron
dh_installmanpages -picu
dh_installinfo
dh_undocumented -picu genccode.8 gencmn.8 gennames.8 \
genprops.8 gentz.8 pkgdata.8
dh_installchangelogs
dh_link
dh_strip
dh_compress
dh_fixperms
# CVS fixup
if test -d CVS; then find debian/tmp -name CVS -print | xargs rm -r; fi
# You may want to make some executables suid here.
dh_suidregister
dh_makeshlibs
dh_installdeb
# dh_perl
dh_shlibdeps && \
sed 's/ libicu16[^,]*,//' debian/libicu$(major).substvars >debian/libicu$(major).substvars.new && mv debian/libicu$(major).substvars.new debian/libicu$(major).substvars
dh_gencontrol -- -Vversion=$(version) -Vmajor=$(major)
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install