From: Stephane Glondu Date: Tue, 28 Dec 2021 10:03:44 +0000 (+0100) Subject: Adapt maintainer scripts to new binary package structure X-Git-Tag: archive/raspbian/4.13.1-3+rpi1~2^2~12 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b7ab5cc545e9b51595defc29a9a701a4444dc9cb;p=ocaml.git Adapt maintainer scripts to new binary package structure --- diff --git a/debian/ocaml-base-nox.postinst.in b/debian/ocaml-base-nox.postinst.in deleted file mode 100644 index 8cab4291..00000000 --- a/debian/ocaml-base-nox.postinst.in +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -set -e - -if [ ! -e /usr/local/lib/ocaml ]; then - if mkdir /usr/local/lib/ocaml 2>/dev/null; then - chown root:staff /usr/local/lib/ocaml - chmod 2775 /usr/local/lib/ocaml - fi -fi -if [ ! -e /usr/local/lib/ocaml/@OCamlABI@ ]; then - if mkdir /usr/local/lib/ocaml/@OCamlABI@ 2>/dev/null; then - chown root:staff /usr/local/lib/ocaml/@OCamlABI@ - chmod 2775 /usr/local/lib/ocaml/@OCamlABI@ - fi -fi -if [ ! -e /usr/local/lib/ocaml/@OCamlABI@/stublibs ]; then - if mkdir /usr/local/lib/ocaml/@OCamlABI@/stublibs 2>/dev/null; then - chown root:staff /usr/local/lib/ocaml/@OCamlABI@/stublibs - chmod 2775 /usr/local/lib/ocaml/@OCamlABI@/stublibs - fi -fi - -for i in /usr/lib/ocaml/3.06 /etc/ocaml /var/lib/ocaml; \ -do \ - if [ -e $i/ld.conf ]; then \ - echo "Removing leftover $i/ld.conf"; \ - rm -f $i/ld.conf; \ - rmdir --ignore-fail-on-non-empty $i; \ - fi; \ -done - -#DEBHELPER# diff --git a/debian/ocaml-base-nox.prerm.in b/debian/ocaml-base-nox.prerm.in deleted file mode 100644 index 15a3aa7c..00000000 --- a/debian/ocaml-base-nox.prerm.in +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -e - -rmdir /usr/local/lib/ocaml/@OCamlABI@/stublibs 2>/dev/null || true -rmdir /usr/local/lib/ocaml/@OCamlABI@ 2>/dev/null || true -rmdir /usr/local/lib/ocaml 2>/dev/null || true - -#DEBHELPER# diff --git a/debian/ocaml-base.postinst.in b/debian/ocaml-base.postinst.in new file mode 100644 index 00000000..98ce5bb5 --- /dev/null +++ b/debian/ocaml-base.postinst.in @@ -0,0 +1,23 @@ +#!/bin/sh +set -e + +if [ ! -e /usr/local/lib/ocaml ]; then + if mkdir /usr/local/lib/ocaml 2>/dev/null; then + chown root:staff /usr/local/lib/ocaml + chmod 2775 /usr/local/lib/ocaml + fi +fi +if [ ! -e /usr/local/lib/ocaml/@OCamlABI@ ]; then + if mkdir /usr/local/lib/ocaml/@OCamlABI@ 2>/dev/null; then + chown root:staff /usr/local/lib/ocaml/@OCamlABI@ + chmod 2775 /usr/local/lib/ocaml/@OCamlABI@ + fi +fi +if [ ! -e /usr/local/lib/ocaml/@OCamlABI@/stublibs ]; then + if mkdir /usr/local/lib/ocaml/@OCamlABI@/stublibs 2>/dev/null; then + chown root:staff /usr/local/lib/ocaml/@OCamlABI@/stublibs + chmod 2775 /usr/local/lib/ocaml/@OCamlABI@/stublibs + fi +fi + +#DEBHELPER# diff --git a/debian/ocaml-base.prerm.in b/debian/ocaml-base.prerm.in new file mode 100644 index 00000000..15a3aa7c --- /dev/null +++ b/debian/ocaml-base.prerm.in @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +rmdir /usr/local/lib/ocaml/@OCamlABI@/stublibs 2>/dev/null || true +rmdir /usr/local/lib/ocaml/@OCamlABI@ 2>/dev/null || true +rmdir /usr/local/lib/ocaml 2>/dev/null || true + +#DEBHELPER# diff --git a/debian/ocaml-nox.postinst.in b/debian/ocaml-nox.postinst.in deleted file mode 100644 index 8e32f2fb..00000000 --- a/debian/ocaml-nox.postinst.in +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -set -e - -if [ "$1" = "configure" ]; then - ln -sf @OCamlStdlibDir@/caml /usr/include/ - - # Save Emacs conffiles from previous ocaml versions - for f in ocaml ocaml-nox ; do - file="/etc/emacs/site-start.d/50$f.el" - if [ -e "$file" ]; then - mv "$file" "$file.save" - fi - done -fi - -#DEBHELPER# diff --git a/debian/ocaml-nox.postrm b/debian/ocaml-nox.postrm deleted file mode 100644 index 3dc4359e..00000000 --- a/debian/ocaml-nox.postrm +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -set -e - -rm -f /usr/include/caml - -#DEBHELPER# diff --git a/debian/ocaml-nox.preinst b/debian/ocaml-nox.preinst deleted file mode 100644 index c7e4af2d..00000000 --- a/debian/ocaml-nox.preinst +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -e - -if [ ! -h /usr/include/caml ] && [ -e /usr/include/caml ]; then - echo "WARNING, /usr/include/caml is not a symlink !!!!" -fi - -#DEBHELPER# diff --git a/debian/ocaml.postinst.in b/debian/ocaml.postinst.in new file mode 100644 index 00000000..156f5d66 --- /dev/null +++ b/debian/ocaml.postinst.in @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "$1" = "configure" ]; then + ln -sf @OCamlStdlibDir@/caml /usr/include/ +fi + +#DEBHELPER# diff --git a/debian/ocaml.postrm b/debian/ocaml.postrm new file mode 100644 index 00000000..3dc4359e --- /dev/null +++ b/debian/ocaml.postrm @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +rm -f /usr/include/caml + +#DEBHELPER# diff --git a/debian/ocaml.preinst b/debian/ocaml.preinst new file mode 100644 index 00000000..c7e4af2d --- /dev/null +++ b/debian/ocaml.preinst @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ ! -h /usr/include/caml ] && [ -e /usr/include/caml ]; then + echo "WARNING, /usr/include/caml is not a symlink !!!!" +fi + +#DEBHELPER#