[arch-commits] Commit in pdfsam/trunk (PKGBUILD)
Evgeniy Alekseev
arcanis at nymeria.archlinux.org
Mon Jun 23 21:07:17 UTC 2014
Date: Monday, June 23, 2014 @ 23:07:17
Author: arcanis
Revision: 113469
upgpkg: pdfsam 2.2.3-1
Modified:
pdfsam/trunk/PKGBUILD
----------+
PKGBUILD | 131 ++++++++++++++++++++++++++++---------------------------------
1 file changed, 61 insertions(+), 70 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-06-23 19:07:44 UTC (rev 113468)
+++ PKGBUILD 2014-06-23 21:07:17 UTC (rev 113469)
@@ -3,8 +3,8 @@
# Contributor: Tom <reztho at archlinux dot us>
pkgname=pdfsam
-pkgver=2.2.2e
-pkgrel=3
+pkgver=2.2.3
+pkgrel=1
pkgdesc="A free open source tool to split and merge pdf documents"
arch=('any')
url="http://www.pdfsam.org/"
@@ -11,16 +11,17 @@
license=('GPL')
depends=('java-environment' 'sh')
makedepends=('apache-ant' 'desktop-file-utils' 'gendesk' 'libarchive')
-source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}-enhanced/${pkgver}/${pkgname}-${pkgver}-out-src.zip")
+source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}-out-src.zip")
install=${pkgname}.install
-md5sums=('d0ac4747ad1d6678e89706c4726890ee')
+md5sums=('b611953e99d6070b1c24dbb193c7582d')
-_branchdir=pdfsam-maine
-_builddir=${pkgname}-${pkgver/_/-}/build
+_branchdir="pdfsam-maine"
+_builddir="${pkgname}-${pkgver}/build"
+_buildver="pdfsam-basic"
prepare() {
# create *.desktop file
- gendesk -n \
+ gendesk -n -f \
--pkgname="${pkgname}" \
--pkgdesc="${pkgdesk}" \
--name="PDFsam" \
@@ -28,80 +29,70 @@
}
build() {
- # Now we unzip all the zips
- for _i in "${srcdir}"/*.zip; do
- if [[ ${_i} != ${srcdir}/${pkgname}-${pkgver/_/-}-out-src.zip ]]; then
- echo "Inflating ${_i}..."
- bsdtar -xf "${_i}"
- fi
- done
+ # unzip source arhives
+ find . -name '*.zip' ! -name "${pkgname}-${pkgver}-out-src.zip" -exec bsdtar -xf {} \;
- # We make our build directory
- mkdir -p "${srcdir}"/${_builddir}
- cd "${srcdir}"/${_branchdir}/ant
- ant -Dbuild.dir="${srcdir}"/${_builddir} \
+ mkdir -p "${srcdir}/${_builddir}"
+ cd "${srcdir}/${_branchdir}/ant"
+ ant -Dbuild.dir="${srcdir}/${_builddir}" \
-Dworkspace.dir="${srcdir}"
-# -Dlangpack.dir=${srcdir}/${pkgname}-langpack \
-# -Dlibs.dir=${srcdir}/libraries-1
}
package() {
- # Now we have the whole thing compiled, so let's install it
- # The main program...
- mkdir -p "${pkgdir}"/usr/share/java/${pkgname}/
- install -m644 "${srcdir}"/${_builddir}/${_branchdir}/release/dist/pdfsam-enhanced/pdfsam-config.xml \
- "${pkgdir}"/usr/share/java/${pkgname}/
- install -m644 "${srcdir}"/${_builddir}/${_branchdir}/release/dist/pdfsam-enhanced/${pkgname}-${pkgver/_/-}.jar \
- "${pkgdir}"/usr/share/java/${pkgname}/
+ install -dm755 "${pkgdir}/usr/share/java/${pkgname}/"
+ # main program
+ install -Dm644 "${srcdir}/${_builddir}/${_branchdir}/release/dist/${_buildver}/pdfsam-config.xml" \
+ "${pkgdir}/usr/share/java/${pkgname}/"
+ install -Dm644 "${srcdir}/${_builddir}/${_branchdir}/release/dist/${_buildver}/${pkgname}-${pkgver}.jar" \
+ "${pkgdir}/usr/share/java/${pkgname}/"
- # The plugins...
- cd "${srcdir}"/${_builddir}/${_branchdir}/release/dist/pdfsam-enhanced/plugins/
- for _i in *; do
- mkdir -p "${pkgdir}"/usr/share/java/${pkgname}/plugins/${_i}
- install -m644 "${srcdir}"/${_builddir}/${_branchdir}/release/dist/pdfsam-enhanced/plugins/${_i}/* \
- "${pkgdir}"/usr/share/java/${pkgname}/plugins/${_i}/
+ # install plugins
+ cd "${srcdir}/${_builddir}/${_branchdir}/release/dist/${_buildver}/plugins/"
+ for _plugin in $(find * -type d); do
+ install -dm755 "${pkgdir}/usr/share/java/${pkgname}/plugins/${_plugin}"
+ install -m644 "${srcdir}/${_builddir}/${_branchdir}/release/dist/${_buildver}/plugins/${_plugin}/"* \
+ "${pkgdir}/usr/share/java/${pkgname}/plugins/${_plugin}/"
done
- # The libs...
- mkdir -p "${pkgdir}"/usr/share/java/${pkgname}/{lib,ext}
- install -m644 "${srcdir}"/${_builddir}/${_branchdir}/release/dist/pdfsam-enhanced/lib/* \
- "${pkgdir}"/usr/share/java/${pkgname}/lib/
- install -m644 "${srcdir}"/${_builddir}/${_branchdir}/release/dist/pdfsam-enhanced/ext/* \
- "${pkgdir}"/usr/share/java/${pkgname}/ext/
+ # install libs
+ install -dm755 "${pkgdir}/usr/share/java/${pkgname}/"{lib,ext}
+ install -m644 "${srcdir}/${_builddir}/${_branchdir}/release/dist/${_buildver}/lib/"* \
+ "${pkgdir}/usr/share/java/${pkgname}/lib/"
+ install -m644 "${srcdir}/${_builddir}/${_branchdir}/release/dist/${_buildver}/ext/"* \
+ "${pkgdir}/usr/share/java/${pkgname}/ext/"
- # The scripts to run it which need to be modified...
- mkdir -p "${pkgdir}"/usr/bin/
- install -m755 "${srcdir}"/${_builddir}/${_branchdir}/release/dist/pdfsam-enhanced/bin/run.sh \
- "${pkgdir}"/usr/bin/${pkgname}
- sed -i "s at DIRNAME=\"\`dirname \$0\`\"@DIRNAME=\"/usr/share/java/${pkgname}\"@g" "${pkgdir}"/usr/bin/${pkgname}
- install -m755 "${srcdir}"/${_builddir}/${_branchdir}/release/dist/pdfsam-enhanced/bin/run-console.sh \
- "${pkgdir}"/usr/bin/${pkgname}-console
- sed -i "s at DIRNAME=\"../lib/\"@DIRNAME=\"/usr/share/java/${pkgname}/lib/\"@g" ${pkgdir}/usr/bin/${pkgname}-console
+ # install scripts and change paths
+ install -Dm755 "${srcdir}/${_builddir}/${_branchdir}/release/dist/${_buildver}/bin/run.sh" \
+ "${pkgdir}/usr/bin/${pkgname}"
+ sed -i "s at DIRNAME=\"\`dirname \$0\`\"@DIRNAME=\"/usr/share/java/${pkgname}\"@g" "${pkgdir}/usr/bin/${pkgname}"
+ install -Dm755 "${srcdir}/${_builddir}/${_branchdir}/release/dist/${_buildver}/bin/run-console.sh" \
+ "${pkgdir}/usr/bin/${pkgname}-console"
+ sed -i "s at DIRNAME=\"../lib/\"@DIRNAME=\"/usr/share/java/${pkgname}/lib/\"@g" "${pkgdir}/usr/bin/${pkgname}-console"
- # The program is GPL, but because of the libraries there is a mix of licenses...
- cd "${srcdir}"/${_builddir}/${_branchdir}/release/dist/pdfsam-enhanced/doc/license/
- for _i in *; do
- mkdir -p "${pkgdir}"/usr/share/licenses/${pkgname}/${_i}
- install -m644 "${srcdir}"/${_builddir}/${_branchdir}/release/dist/pdfsam-enhanced/doc/license/${_i}/* \
- "${pkgdir}"/usr/share/licenses/${pkgname}/${_i}/
+ # licenses (they are needed for plugins)
+ cd "${srcdir}/${_builddir}/${_branchdir}/release/dist/${_buildver}/doc/license/"
+ for _plugin in $(find * -type d); do
+ install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}/${_plugin}"
+ install -m644 "${srcdir}/${_builddir}/${_branchdir}/release/dist/${_buildver}/doc/license/${_plugin}/"* \
+ "${pkgdir}/usr/share/licenses/${pkgname}/${_plugin}/"
done
- # The icon and the .desktop shortcut...
- mkdir -p "${pkgdir}"/usr/share/pixmaps "${pkgdir}"/usr/share/applications
- install -m644 "${srcdir}"/${_builddir}/${_branchdir}/release/dist/pdfsam-enhanced/doc/icons/pdfsam_enhanced.png \
- "${pkgdir}"/usr/share/pixmaps/pdfsam.png
- install -m644 "${srcdir}"/${pkgname}.desktop "${pkgdir}"/usr/share/applications/
+ # desktop
+ install -Dm644 "${srcdir}/${_builddir}/${_branchdir}/release/dist/${_buildver}/doc/icons/pdfsam_basic.png" \
+ "${pkgdir}/usr/share/pixmaps/pdfsam.png"
+ install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
- # The tutorial and other docs...
- mkdir -p "${pkgdir}"/usr/share/doc/${pkgname}/{examples,xsd}
- install -m644 "${srcdir}"/${_builddir}/${_branchdir}/release/dist/pdfsam-enhanced/doc/pdfsam-1.5.0e-tutorial.pdf \
- "${pkgdir}"/usr/share/doc/${pkgname}/
- install -m644 "${srcdir}"/${_builddir}/${_branchdir}/release/dist/pdfsam-enhanced/doc/changelog-enhanced.txt \
- "${pkgdir}"/usr/share/doc/${pkgname}/
- install -m644 "${srcdir}"/${_builddir}/${_branchdir}/release/dist/pdfsam-enhanced/doc/readme.txt \
- "${pkgdir}"/usr/share/doc/${pkgname}/
- install -m644 "${srcdir}"/${_builddir}/${_branchdir}/release/dist/pdfsam-enhanced/doc/examples/* \
- "${pkgdir}"/usr/share/doc/${pkgname}/examples/
- install -m644 "${srcdir}"/${_builddir}/${_branchdir}/release/dist/pdfsam-enhanced/doc/xsd/* \
- "${pkgdir}"/usr/share/doc/${pkgname}/xsd/
+ # docs
+ install -dm755 "${pkgdir}/usr/share/doc/${pkgname}/examples"
+ install -dm755 "${pkgdir}/usr/share/doc/${pkgname}/xsd"
+ install -Dm644 "${srcdir}/${_builddir}/${_branchdir}/release/dist/${_buildver}/doc/pdfsam-1.1.0-tutorial.pdf" \
+ "${pkgdir}/usr/share/doc/${pkgname}/"
+ install -Dm644 "${srcdir}/${_builddir}/${_branchdir}/release/dist/${_buildver}/doc/changelog-basic.txt" \
+ "${pkgdir}/usr/share/doc/${pkgname}/"
+ install -Dm644 "${srcdir}/${_builddir}/${_branchdir}/release/dist/${_buildver}/doc/readme.txt" \
+ "${pkgdir}/usr/share/doc/${pkgname}/"
+ install -Dm644 "${srcdir}/${_builddir}/${_branchdir}/release/dist/${_buildver}/doc/examples/"* \
+ "${pkgdir}/usr/share/doc/${pkgname}/examples/"
+ install -Dm644 "${srcdir}/${_builddir}/${_branchdir}/release/dist/${_buildver}/doc/xsd/"* \
+ "${pkgdir}/usr/share/doc/${pkgname}/xsd/"
}
More information about the arch-commits
mailing list