diff options
author | Mark Laws | 2015-07-05 16:03:15 +0900 |
---|---|---|
committer | Mark Laws | 2015-07-05 16:03:15 +0900 |
commit | 46aadf42d2828065bc08859e61f942ca4bb3cf0f (patch) | |
tree | 75ad7a00cb84197c476219498351959377bbb317 | |
parent | f1396578e1b4b87acbf27fe23a89d5390462564f (diff) | |
download | aur-46aadf42d2828065bc08859e61f942ca4bb3cf0f.tar.gz |
PKGBUILD cleanups
-rw-r--r-- | PKGBUILD | 36 |
1 files changed, 21 insertions, 15 deletions
@@ -4,31 +4,37 @@ pkgname=ats2-contrib _pkgname=ATS2-Postiats-contrib pkgver=0.2.0 -pkgrel=1 +pkgrel=2 pkgdesc="Extra libraries for the ATS2 programming language" arch=('any') url="http://www.ats-lang.org/" license=('GPL3') depends=('ats2-postiats') +makedepends=('ats2-postiats') options=('staticlibs') -source=( - "http://downloads.sourceforge.net/project/ats2-lang/ats2-lang/ats2-postiats-${pkgver}/$_pkgname-$pkgver.tgz") +source=("https://downloads.sourceforge.net/project/ats2-lang/ats2-lang/ats2-postiats-${pkgver}/${_pkgname}-${pkgver}.tgz") sha256sums=('e2ce0d62684e06be4c23aa889cae7ea45447c36f7cdc6c3ee173e9586426ffa1') package() { - local ats2init=/etc/profile.d/ats2-postiats - source "${ats2init}.sh" + source /etc/profile.d/ats2-postiats.sh + local patshome="${pkgdir%%/}/${PATSHOME}" + local profiled="${pkgdir}/etc/profile.d" - mkdir -p "$pkgdir/$PATSHOME" - mv "$_pkgname-$pkgver"/* "$pkgdir/$PATSHOME" + mkdir -p "${patshome}" + mkdir -p "${profiled}" + cp -a "${srcdir}/${_pkgname}-${pkgver}/." "${patshome}" - local profiled="$pkgdir/etc/profile.d" - mkdir -p "$profiled" - local scriptbase="${profiled}/${pkgname}" - echo "source ${ats2init}.sh" > "${scriptbase}.sh" - echo 'export PATSHOMERELOC=$PATSHOME' >> "${scriptbase}.sh" - echo "source ${ats2init}.csh" > "${scriptbase}.csh" - echo 'setenv PATSHOMERELOC $PATSHOME' >> "${scriptbase}.csh" + cat <<EOF > "${profiled}/${pkgname}.sh" +source /etc/profile.d/ats2-postiats.sh +export PATSHOMERELOC=\$PATSHOME +EOF - chmod 0755 "${scriptbase}.sh" "${scriptbase}.csh" + cat <<EOF > "${profiled}/${pkgname}.csh" +source /etc/profile.d/ats2-postiats.csh +setenv PATSHOMERELOC \$PATSHOME +EOF } + +# Local Variables: +# compile-command: "makepkg -sm" +# End: |