summarylogtreecommitdiffstats
path: root/update.sh
diff options
context:
space:
mode:
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh44
1 files changed, 31 insertions, 13 deletions
diff --git a/update.sh b/update.sh
index 80415846fdc5..6c13ce86ca70 100755
--- a/update.sh
+++ b/update.sh
@@ -2,25 +2,26 @@
AUR_NAME=offlinemsmtp
PROJ_NAME=offlinemsmtp
-DESCRIPTION="msmtp wrapper allowing for offline use"
+DESCRIPTION="Use msmtp offline by queuing email until you have an internet connection."
URL=https://gitlab.com/sumner/offlinemsmtp
DEPENDS=(python-watchdog python-gobject)
LICENSE='GPL3'
ADDITIONAL="replaces=('python-offlinemsmtp')"
+SOURCES=(
+ https://files.pythonhosted.org/packages/source/${PROJ_NAME:0:1}/${PROJ_NAME}/${PROJ_NAME}-$1.tar.gz
+ https://gitlab.com/sumner/offlinemsmtp/raw/master/systemd/offlinemsmtp.service
+)
+NOEXTRACT=(offlinemsmtp.service)
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
+pkgrel=1
+if [[ $# == 2 ]]; then
+ pkgrel=$2
+fi
echo "# Maintainer: Sumner Evans <sumner.evans98 at gmail dot com>
@@ -28,7 +29,7 @@ pkgbase='${AUR_NAME}'
pkgname=('${AUR_NAME}')
_module='${PROJ_NAME}'
pkgver='$1'
-pkgrel=1
+pkgrel=$pkgrel
pkgdesc='${DESCRIPTION}'
url='${URL}'
depends=(
@@ -43,8 +44,23 @@ echo ")
makedepends=('python-setuptools')
license=('${LICENSE}')
arch=('any')
-source=('${src}')
-sha256sums=('${sha}')
+source=(" >> PKGBUILD
+
+# Include the sources.
+for s in ${SOURCES[*]}; do
+ echo " '$s'" >> PKGBUILD
+done
+
+echo ")
+noextract=(" >> PKGBUILD
+
+# Include the no-extracts.
+for n in ${NOEXTRACT[*]}; do
+ echo " '$n'" >> PKGBUILD
+done
+
+echo ")
+md5sums=()
${ADDITIONAL}
build() {
@@ -53,11 +69,13 @@ build() {
}
package() {
- depends+=()
+ install -Dm644 offlinemsmtp.service \"\${pkgdir}/usr/lib/systemd/user/offlinemsmtp.service\"
cd \"\${srcdir}/\${_module}-\${pkgver}\"
python setup.py install --root=\"\${pkgdir}\" --optimize=1 --skip-build
}" >> PKGBUILD
+updpkgsums
+
make
# Test