mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-678 manage the $(libdir)/icu/current symlink in every package
(overkill for the data package, I guess) X-SVN-Rev: 2984
This commit is contained in:
parent
1bc26a35f3
commit
109e3e6635
8 changed files with 144 additions and 25 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -27,6 +27,8 @@ icu4c/debian/icu.prerm
|
|||
icu4c/debian/libicu-dev
|
||||
icu4c/debian/libicu[0-9]*
|
||||
icu4c/debian/libicu[0-9]*.p*
|
||||
icu4c/debian/postinst
|
||||
icu4c/debian/prerm
|
||||
icu4c/debian/tmp
|
||||
icu4c/source/Makefile
|
||||
icu4c/source/README
|
||||
|
|
|
@ -9,6 +9,8 @@ icu-locales
|
|||
icu-data
|
||||
icu-i18ndata
|
||||
tmp
|
||||
postinst
|
||||
prerm
|
||||
icu.postinst
|
||||
icu.prerm
|
||||
libicu[0-9]*.p*
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
icu (1.7-1) unstable; urgency=low
|
||||
|
||||
* Update to ICU version 1.7.
|
||||
|
||||
-- Yves Arrouye <yves@debian.org> Tue, 21 Nov 2000 14:09:37 -0800
|
||||
|
||||
icu (1.6.0.1-20001113-2) unstable; urgency=low
|
||||
|
||||
* New snapshot with better ISO-2022.
|
||||
|
|
|
@ -24,6 +24,16 @@ set -e
|
|||
|
||||
case "$1" in
|
||||
configure)
|
||||
# Adjust the current ICU link in /usr/lib/icu
|
||||
|
||||
icucurrent=`2>/dev/null ls -dp /usr/lib/icu/* | sed -n 's,.*/\([^/]*\)/$,\1,p'| sort -rn | head -1`
|
||||
cd /usr/lib/icu
|
||||
rm -f current
|
||||
if test x"$icucurrent" != x
|
||||
then
|
||||
ln -s "$icucurrent" current
|
||||
fi
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
|
||||
|
|
|
@ -17,19 +17,18 @@ set -e
|
|||
|
||||
case "$1" in
|
||||
remove|upgrade|deconfigure)
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
# Adjust the current ICU link in /usr/lib/icu
|
||||
|
||||
# Set ICU_DATA for ease of testing files. It is not necessary to
|
||||
# export it as we are guaranteed that the binaries we invoke will
|
||||
# use the right directory. But we're not taking chances with the
|
||||
# future :)
|
||||
|
||||
ICU_DATA=@libdir@/@PACKAGE@/@VERSION@
|
||||
export ICU_DATA
|
||||
|
||||
rm -f $ICU_DATA/cnvalias.dat
|
||||
icucurrent=`2>/dev/null ls -dp /usr/lib/icu/* | sed -n -e '/\/@VERSION@\//d' -e 's,.*/\([^/]*\)/$,\1,p' | head -1`
|
||||
cd /usr/lib/icu
|
||||
rm -f current
|
||||
if test x"$icucurrent" != x
|
||||
then
|
||||
ln -s "$icucurrent" current
|
||||
fi
|
||||
# install-info --quiet --remove /usr/info/foo.info.gz
|
||||
;;
|
||||
|
||||
failed-upgrade)
|
||||
;;
|
||||
*)
|
||||
|
|
55
icu4c/debian/postinst.in
Normal file
55
icu4c/debian/postinst.in
Normal file
|
@ -0,0 +1,55 @@
|
|||
#! /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)
|
||||
# Adjust the current ICU link in /usr/lib/icu
|
||||
|
||||
icucurrent=`2>/dev/null ls -dp /usr/lib/icu/* | sed -n 's,.*/\([^/]*\)/$,\1,p'| sort -rn | head -1`
|
||||
cd /usr/lib/icu
|
||||
rm -f current
|
||||
if test x"$icucurrent" != x
|
||||
then
|
||||
ln -s "$icucurrent" current
|
||||
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
|
||||
|
||||
|
46
icu4c/debian/prerm.in
Normal file
46
icu4c/debian/prerm.in
Normal file
|
@ -0,0 +1,46 @@
|
|||
#! /bin/sh
|
||||
# prerm script for foo
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <prerm> `remove'
|
||||
# * <old-prerm> `upgrade' <new-version>
|
||||
# * <new-prerm> `failed-upgrade' <old-version>
|
||||
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
|
||||
# * <deconfigured's-prerm> `deconfigure' `in-favour'
|
||||
# <package-being-installed> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see /usr/share/doc/packaging-manual/
|
||||
|
||||
case "$1" in
|
||||
remove|upgrade|deconfigure)
|
||||
# Adjust the current ICU link in /usr/lib/icu
|
||||
|
||||
icucurrent=`2>/dev/null ls -dp /usr/lib/icu/* | sed -n -e '/\/@VERSION@\//d' -e 's,.*/\([^/]*\)/$,\1,p' | head -1`
|
||||
cd /usr/lib/icu
|
||||
rm -f current
|
||||
if test x"$icucurrent" != x
|
||||
then
|
||||
ln -s "$icucurrent" current
|
||||
fi
|
||||
# install-info --quiet --remove /usr/info/foo.info.gz
|
||||
;;
|
||||
failed-upgrade)
|
||||
;;
|
||||
*)
|
||||
echo "prerm 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
|
||||
|
||||
|
|
@ -66,10 +66,19 @@ $(builddir)/configure-stamp:
|
|||
cd $(builddir); CFLAGS='$(CFLAGS)' CXXFLAGS='$(CFLAGS)' INSTALL_PROGRAM='$(INSTALL_PROGRAM)' $(builddir_relative_srcdir)/configure --srcdir=$(builddir_relative_srcdir) --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --with-data-packaging=files --disable-rpath --enable-shared --enable-static --disable-samples
|
||||
touch $@
|
||||
|
||||
build: $(builddir)/configure-stamp $(builddir)/build-stamp
|
||||
build: $(builddir)/configure-stamp debian-files $(builddir)/build-stamp
|
||||
|
||||
$(builddir)/build-stamp:
|
||||
@$(MAKE) -f debian/rules $(addprefix debian/,$(DEBIAN_FILES))
|
||||
# Build some Debian files
|
||||
DEBIAN_FILES=control icu.conffiles postinst prerm icu.postinst icu.prerm libicu$(lib_version_major).postinst
|
||||
|
||||
debian/%: debian/%.in
|
||||
cd $(builddir) \
|
||||
&& CONFIG_FILES=$(builddir_relative_topdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
debian-files: $(addprefix debian/,$(DEBIAN_FILES))
|
||||
|
||||
$(builddir)/build-stamp:
|
||||
@$(MAKE) -f debian/rules
|
||||
|
||||
dh_testdir
|
||||
|
||||
|
@ -106,16 +115,6 @@ install: build
|
|||
binary-indep: build install
|
||||
# We have nothing to do by default.
|
||||
|
||||
# Build some Debian files
|
||||
DEBIAN_FILES = control icu.conffiles icu.postinst icu.prerm libicu$(lib_version_major).prerm.in libicu$(lib_version_major).prerm libicu$(lib_version_major).postinst
|
||||
|
||||
debian/libicu$(lib_version_major).%: debian/libicu.%
|
||||
cp $< $@
|
||||
|
||||
debian/%: debian/%.in
|
||||
cd $(builddir) \
|
||||
&& CONFIG_FILES=$(builddir_relative_topdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install
|
||||
# dh_testversion
|
||||
|
@ -220,4 +219,4 @@ update-changelog:
|
|||
fi
|
||||
|
||||
binary: update-changelog binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary install update-changelog
|
||||
.PHONY: build clean binary-indep binary-arch binary install debian-files update-changelog
|
||||
|
|
Loading…
Add table
Reference in a new issue