[arch-commits] Commit in apache-ant/trunk (PKGBUILD)
Guillaume Alaux
guillaume at archlinux.org
Sat Oct 4 12:14:50 UTC 2014
Date: Saturday, October 4, 2014 @ 14:14:50
Author: guillaume
Revision: 223861
FS#42192 add documentation split package
Modified:
apache-ant/trunk/PKGBUILD
----------+
PKGBUILD | 60 +++++++++++++++++++++++++++++++++++-------------------------
1 file changed, 35 insertions(+), 25 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-10-04 08:04:25 UTC (rev 223860)
+++ PKGBUILD 2014-10-04 12:14:50 UTC (rev 223861)
@@ -2,21 +2,18 @@
# Maintainer: Guillaume ALAUX <guillaume at archlinux.org>
# Contributor: Andrew Wright <andreww at photism.org>
# Contributor: Paul Mattal <paul at archlinux.org>
-pkgname=apache-ant
+pkgbase=apache-ant
+pkgname=('apache-ant' 'apache-ant-doc')
pkgver=1.9.4
-pkgrel=2
-pkgdesc='A java-based build tool'
+pkgrel=3
arch=('any')
url='http://ant.apache.org/'
license=('APACHE')
-depends=('java-environment')
makedepends=('java-environment' 'apache-ant' 'junit')
-optdepends=('junit: to use the junit tasks')
-install=${pkgname}.install
-source=(http://apache.org/dist/ant/source/${pkgname}-${pkgver}-src.tar.bz2
- ${pkgname}.sh
- ${pkgname}.csh
- ${pkgname}.install
+source=(http://apache.org/dist/ant/source/${pkgbase}-${pkgver}-src.tar.bz2
+ apache-ant.sh
+ apache-ant.csh
+ apache-ant.install
bin_ant
ant.conf)
sha256sums=('ac594ff7dcd461ebb3e607493af7682f84b1ceaa0621e17ec6367b8d2c410a1c'
@@ -26,10 +23,10 @@
'29b443ae3af7e246b4ff0b5ec9f023ae95992db1a010a362e70ca7a65a6df461'
'b86ce60f61cbd85a9faa61d698b0fc4607f1ff375cd15673aee57f053012eacb')
-_ant_home=/usr/share/${pkgname}
+_ant_home=/usr/share/${pkgbase}
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd "${srcdir}/${pkgbase}-${pkgver}"
# ant needs HOME to download libs to $HOME/.m2/repository
export ANT_OPTS="-Duser.home=${srcdir}"
@@ -43,15 +40,20 @@
ant dist
}
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}/${pkgname}-${pkgver}"
+package_apache-ant() {
+ pkgdesc='A java-based build tool'
+ depends=('java-environment')
+ optdepends=('junit: to use the junit tasks')
+ install=apache-ant.install
+ cd "${srcdir}/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}"
+
install -dm755 ${pkgdir}${_ant_home}
- install -dm755 ${pkgdir}/etc/${pkgname}
- cp -Rp etc/* ${pkgdir}/etc/${pkgname}
- rm ${pkgdir}/etc/${pkgname}/ant-bootstrap.jar
- ln -s /etc/${pkgname} ${pkgdir}${_ant_home}/etc
+ install -dm755 ${pkgdir}/etc/${pkgbase}
+ cp -Rp etc/* ${pkgdir}/etc/${pkgbase}
+ rm ${pkgdir}/etc/${pkgbase}/ant-bootstrap.jar
+ ln -s /etc/${pkgbase} ${pkgdir}${_ant_home}/etc
install -dm755 ${pkgdir}${_ant_home}/bin
find bin -type f -a ! -name \*.bat -a ! -name \*.cmd \
@@ -60,9 +62,9 @@
install -Dm755 ${srcdir}/bin_ant ${pkgdir}/usr/bin/ant
install -Dm644 ${srcdir}/ant.conf ${pkgdir}/etc/apache-ant/ant.conf
- install -dm755 ${pkgdir}/usr/share/java/${pkgname}
- install -m644 lib/*.jar ${pkgdir}/usr/share/java/${pkgname}
- ln -s /usr/share/java/${pkgname} ${pkgdir}${_ant_home}/lib
+ install -dm755 ${pkgdir}/usr/share/java/${pkgbase}
+ install -m644 lib/*.jar ${pkgdir}/usr/share/java/${pkgbase}
+ ln -s /usr/share/java/${pkgbase} ${pkgdir}${_ant_home}/lib
# fix python2 path
sed -i 's|/usr/bin/python|/usr/bin/python2|' ${pkgdir}${_ant_home}/bin/runant.py
@@ -69,10 +71,18 @@
# install profile.d script
install -dm755 ${pkgdir}/etc/profile.d
- install -m755 "${srcdir}"/${pkgname}.{csh,sh} ${pkgdir}/etc/profile.d/
+ install -m755 "${srcdir}"/apache-ant.{csh,sh} ${pkgdir}/etc/profile.d/
# License says NOTICE file should be redistributed for derivative works
- cd ${srcdir}/${pkgname}-${pkgver}
- install -dm755 ${pkgdir}/usr/share/licenses/${pkgname}
- install -m644 LICENSE NOTICE ${pkgdir}/usr/share/licenses/${pkgname}
+ cd ${srcdir}/${pkgbase}-${pkgver}
+ install -dm755 ${pkgdir}/usr/share/licenses/${pkgbase}
+ install -m644 LICENSE NOTICE ${pkgdir}/usr/share/licenses/${pkgbase}
}
+
+package_apache-ant-doc() {
+ pkgdesc='Apache Ant build tool documentation'
+
+ install -dm755 "${pkgdir}/usr/share/doc/${pkgbase}"
+ cp -r "${srcdir}"/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}/manual/* \
+ "${pkgdir}/usr/share/doc/${pkgbase}/"
+}
More information about the arch-commits
mailing list