[Pkg-mono-svn-commits] [SCM] mono branch, ubuntu-symlink-disinfect, updated. 2.0.1-6-3-g0957cfa
Jo Shields
directhex at apebox.org
Sun May 10 15:18:40 UTC 2009
The following commit has been merged in the ubuntu-symlink-disinfect branch:
commit 0957cfa214ea7d011beeab1abbc32ef4ec963400
Author: Jo Shields <directhex at apebox.org>
Date: Sun May 10 16:18:01 2009 +0100
Modify rules to split Ubuntu-specific preinst into its own file, where it can be updated without mangling the main rules file
diff --git a/debian/preinst.ubuntu b/debian/preinst.ubuntu
new file mode 100644
index 0000000..fff66db
--- /dev/null
+++ b/debian/preinst.ubuntu
@@ -0,0 +1,6 @@
+# revert Ubuntu doc dir symlinking to Debian style
+if [ "$1" = "upgrade" ]
+ then if dpkg --compare-versions $2 lt 2.4 && [ -L /usr/share/doc/#PACKAGENAME# ]
+ then rm -fr /usr/share/doc/#PACKAGENAME#
+ fi
+fi
diff --git a/debian/rules b/debian/rules
index fd1ae61..d900c25 100755
--- a/debian/rules
+++ b/debian/rules
@@ -286,17 +286,10 @@ binary-indep: build-arch install-arch build-indep install-indep
debian/dh_clistrip -i --dbg-package=mono-dbg
dh_compress -i
- # Hack workaround to kill sucky Ubuntu symlink mess
+ # Hack workaround to allow Ubuntu to run its own preinst (e.g. to kill symlinked docdirs)
if [ "$(DISTRO)" = "Ubuntu" ]; then \
for p in $$(dh_listpackages -i); do \
- ( \
- echo "# revert Ubuntu doc dir symlinking to Debian style"; \
- echo "if [ \"\$$1\" = \"upgrade\" ]; then"; \
- echo " dpkg --compare-versions \$$2 lt 2.4 && if [ -L /usr/share/doc/$$p ]; then"; \
- echo " rm -fr /usr/share/doc/$$p"; \
- echo " fi;"; \
- echo "fi"; \
- ) >> debian/$$p.preinst.debhelper; \
+ sed "s/#PACKAGENAME#/$$p/g" $(CURDIR)/debian/preinst.ubuntu >> debian/$$p.preinst.debhelper; \
done; \
fi
@@ -367,17 +360,10 @@ binary-arch: build-arch install-arch
dh_strip -s
dh_compress -s -Xskeleton.cs
- # Hack workaround to kill sucky Ubuntu symlink mess
+ # Hack workaround to allow Ubuntu to run its own preinst (e.g. to kill symlinked docdirs)
if [ "$(DISTRO)" = "Ubuntu" ]; then \
for p in $$(dh_listpackages -a); do \
- ( \
- echo "# revert Ubuntu doc dir symlinking to Debian style"; \
- echo "if [ \"\$$1\" = \"upgrade\" ]; then"; \
- echo " dpkg --compare-versions \$$2 lt 2.4 && if [ -L /usr/share/doc/$$p ]; then"; \
- echo " rm -fr /usr/share/doc/$$p"; \
- echo " fi;"; \
- echo "fi"; \
- ) >> debian/$$p.preinst.debhelper; \
+ sed "s/#PACKAGENAME#/$$p/g" $(CURDIR)/debian/preinst.ubuntu >> debian/$$p.preinst.debhelper; \
done; \
fi
--
mono
More information about the Pkg-mono-svn-commits
mailing list