aboutsummaryrefslogtreecommitdiff
path: root/Keywords
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2016-05-24 22:32:49 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2016-05-24 22:32:49 +0000
commit963854440c8d5cb49ac23779c965d0f6fb408744 (patch)
tree097b956f7e23b0db264fe1d3cdeee8eafc050cd9 /Keywords
parentddf8b3e6be1c5e8bd6c6415891ec22c20f432245 (diff)
downloadports-963854440c8d5cb49ac23779c965d0f6fb408744.tar.gz
ports-963854440c8d5cb49ac23779c965d0f6fb408744.zip
Add a new keywork xmlcatmgr
It simplifies the handling of the XML and SMGL catalog It brings a big of consistency by always specifying the catalog path absolute instead of mixing absolute and relative path. The keyword is also written a PKG_ROOTDIR friendly to simplify cross installing Reviewed by: hrs Differential Revision: https://reviews.freebsd.org/D6539
Notes
Notes: svn path=/head/; revision=415814
Diffstat (limited to 'Keywords')
-rw-r--r--Keywords/xmlcatmgr.ucl34
1 files changed, 34 insertions, 0 deletions
diff --git a/Keywords/xmlcatmgr.ucl b/Keywords/xmlcatmgr.ucl
new file mode 100644
index 000000000000..474c4a81bc79
--- /dev/null
+++ b/Keywords/xmlcatmgr.ucl
@@ -0,0 +1,34 @@
+# $FreeBSD$
+
+actions: [file]
+arguments: true
+post-install: <<EOD
+ case "%@" in
+ /*) cat="%@" ;;
+ *) cat="%D/%@" ;;
+ esac
+ case "%@" in
+ *.xml)
+ xmlcatmgr_cmd="xmlcatmgr -c ${PKG_ROOTDIR}%D/share/xml/catalog.ports add nextCatalog"
+ ;;
+ *)
+ xmlcatmgr_cmd="xmlcatmgr -sc ${PKG_ROOTDIR}%D/share/sgml/catalog.ports add CATALOG"
+ ;;
+ esac
+ ${xmlcatmgr_cmd} ${cat}
+EOD
+post-deinstall: <<EOD
+ case "%@" in
+ /*) cat="%@" ;;
+ *) cat="%D/%@" ;;
+ esac
+ case "%@" in
+ *.xml)
+ xmlcatmgr_cmd="xmlcatmgr -c ${PKG_ROOTDIR}%D/share/xml/catalog.ports remove nextCatalog"
+ ;;
+ *)
+ xmlcatmgr_cmd="xmlcatmgr -sc ${PKG_ROOTDIR}%D/share/sgml/catalog.ports remove CATALOG"
+ ;;
+ esac
+ ${xmlcatmgr_cmd} ${cat}
+EOD