diff options
author | witit | 2016-03-15 07:55:51 +0700 |
---|---|---|
committer | witit | 2016-03-15 07:55:51 +0700 |
commit | 5d65d23a81dc62a9c38c2c012d0cc9939c5e2271 (patch) | |
tree | d2a40a64a00ab4b95576793a4fb43f08ef8a0803 | |
parent | f66ac59f10f5ab6d231f1212b95a38b0b0382cc7 (diff) | |
download | aur-5d65d23a81dc62a9c38c2c012d0cc9939c5e2271.tar.gz |
correct and tidy up PKGBUILD
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 28 |
2 files changed, 25 insertions, 8 deletions
@@ -6,7 +6,8 @@ pkgbase = invoiceplane arch = any license = MIT depends = php - source = https://invoiceplane.com/download/v1.4.6 - md5sums = 6e4fc1bb5446accc6ae2b1907cf1e974 + source = https://github.com/InvoicePlane/InvoicePlane/archive/v1.4.6.tar.gz + sha512sums = 6bd57bb0ec2c5d04e0ac815bd1da75c175bf50597d5dae7b3b04f8eecd1035f65217e09c56114e930df2219f478df3bea11546ab2003e80d405739bf5f29c9d3 + pkgname = invoiceplane @@ -15,10 +15,26 @@ source=("https://github.com/InvoicePlane/InvoicePlane/archive/v1.4.6.tar.gz") sha512sums=('6bd57bb0ec2c5d04e0ac815bd1da75c175bf50597d5dae7b3b04f8eecd1035f65217e09c56114e930df2219f478df3bea11546ab2003e80d405739bf5f29c9d3') package() { - cd ${srcdir} - install -vdm0755 $pkgdir/usr/share/webapps - mkdir -p $pkgdir/etc/webapps/invoiceplane - cp -a "${_pkgname}-${pkgver}" ${pkgdir}/usr/share/webapps/invoiceplane - sudo ln -s "/etc/webapps/invoiceplane/database.php" "/usr/share/webapps/invoiceplane/application/config/database.php" - install -D "${_pkgname}-${pkgver}/license.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + # Each of these functions start in the $srcdir already. + + # Quote variables to prevent word splitting. + # See <http://mywiki.wooledge.org/Quotes#When_Should_You_Quote.3F> + + install -d "$pkgdir"/usr/share/webapps + + # Consistency. + install -d "$pkgdir"/etc/webapps/invoiceplane + + # Note that -a with --preserve=all only works here as package() is run + # under fakeroot, otherwise you'd use -dr --no-preserve=ownership + cp -a "$_pkgname-$pkgver" "$pkgdir"/usr/share/webapps/invoiceplane + + # This is temporarily a broken symlink but will be correct once installed. + file=""$pkgdir"/usr/share/webapps/invoiceplane/application/config/database.php" + if [ -f $file ] ; then + rm $file + fi + ln -s /etc/webapps/invoiceplane/database.php "$pkgdir"/usr/share/webapps/invoiceplane/application/config/database.php + + install -Dm644 "$_pkgname-$pkgver"/license.txt "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE } |