diff options
author | Sumner Evans | 2018-12-22 22:51:43 -0700 |
---|---|---|
committer | Sumner Evans | 2018-12-22 22:51:43 -0700 |
commit | 4828d440d8f89bceb5302d9c7f3b52c595f54ea3 (patch) | |
tree | 2ed67382e574a4ce82b744a9076b32eeb2454635 /update.sh | |
download | aur-4828d440d8f89bceb5302d9c7f3b52c595f54ea3.tar.gz |
0.9.1
Diffstat (limited to 'update.sh')
-rwxr-xr-x | update.sh | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/update.sh b/update.sh new file mode 100755 index 000000000000..7c157ee0d4f7 --- /dev/null +++ b/update.sh @@ -0,0 +1,64 @@ +#! /bin/sh + +AUR_NAME=rst2beamer3k +PROJ_NAME=rst2beamer3k +DESCRIPTION="msmtp wrapper allowing for offline use" +URL=https://github.com/myint/rst2beamer +DEPENDS=() +LICENSE='GPL' +ADDITIONAL=$'provides=("rst2beamer")\nconflicts=("rst2beamer")' + +if [[ $# == 0 ]]; then + echo 'Usage: ./update.sh VERSION_NUMBER' + exit 1 +fi + +src=https://files.pythonhosted.org/packages/source/${PROJ_NAME:0:1}/${PROJ_NAME}/${PROJ_NAME}-$1.tar.gz + +# Get the sha256sum sum of the package. +mkdir -p dist +pushd dist +wget $src +sha=$(sha256sum "${PROJ_NAME}-$1.tar.gz" | cut -d ' ' -f 1) +popd + +echo "# Maintainer: Sumner Evans <sumner.evans98 at gmail dot com> + +pkgbase=('${AUR_NAME}') +pkgname=('${AUR_NAME}') +_module='${PROJ_NAME}' +pkgver='$1' +pkgrel=1 +pkgdesc='${DESCRIPTION}' +url='${URL}' +depends=( + 'python'" > PKGBUILD + +# Include the dependencies. +for d in ${DEPENDS[*]}; do + echo " '$d'" >> PKGBUILD +done + +echo ") +makedepends=('python-setuptools') +license=('${LICENSE}') +arch=('any') +source=('${src}') +sha256sums=('${sha}') +${ADDITIONAL} + +build() { + cd \"\${srcdir}/\${_module}-\${pkgver}\" + python setup.py build +} + +package() { + depends+=() + cd \"\${srcdir}/\${_module}-\${pkgver}\" + python setup.py install --root=\"\${pkgdir}\" --optimize=1 --skip-build +}" >> PKGBUILD + +make + +# Test +makepkg -f |