diff options
author | Morbius | 2024-02-19 15:44:25 +0100 |
---|---|---|
committer | Morbius | 2024-02-21 06:10:11 +0100 |
commit | 78779f91d9439c38bcb39e935e1f26a69a4f3ac2 (patch) | |
tree | 6334255d342dc95dcfb50f77b94eb3b0e5a4a974 | |
parent | 52085baf966fd4ecffcb32aabd07e6cc6f28a8cc (diff) | |
download | aur-78779f91d9439c38bcb39e935e1f26a69a4f3ac2.tar.gz |
Version 2024.1
- Run Python unit tests.
- Bundle upstream documentation.
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | Makefile | 17 | ||||
-rw-r--r-- | PKGBUILD | 21 | ||||
-rw-r--r-- | install.sh | 10 |
4 files changed, 32 insertions, 22 deletions
@@ -1,6 +1,6 @@ pkgbase = automx2 pkgdesc = Mail User Agent (email client) configuration made easy - pkgver = 2022.1 + pkgver = 2024.1 pkgrel = 1 url = https://github.com/rseichter/automx2 install = install.sh @@ -15,10 +15,10 @@ pkgbase = automx2 depends = python-flask-sqlalchemy depends = python-ldap3 backup = etc/automx2/automx2.conf - source = https://files.pythonhosted.org/packages/source/a/automx2/automx2-2022.1.tar.gz + source = https://files.pythonhosted.org/packages/source/a/automx2/automx2-2024.1.tar.gz source = automx2.conf source = automx2.service - b2sums = 691ff333188d104f93f7cf9ee45d15d99212464a125bb4190341dda6b8165bd564d5b26b1e997ece8139606177e74caf24afe70a06786695c3f7fa21bec74c57 + b2sums = 9608fc25e2237aedfe1c71ebda981df159713066365712c94b49b83897b73f75fbafe83655b76afe860d9000d8bd1bb2e63c245cca6ba0710bbf391a7f545e81 b2sums = e7afbacc9166556323f1c46f7bf65a906725cfce31f774f5bd47a5ab32102dacfd318c65c8524cf963918178097f8643b597c72db9514e131ee35d21e05240ce b2sums = add8bc242881dcb65f44c3d3c88f32818da01b6a1cec4e99f4c7665d9e7a36c59443a5cc6a8a04d70500d232d09be09eeb544c4da9fa70ec40be945ee0257be9 @@ -1,35 +1,36 @@ # vim: ts=4 sw=4 noet -PKG = $(shell awk -F = '/^pkgname/ {print $$2}' PKGBUILD) +PKG = $(shell awk -F '"' '/^pkgname/ {print $$2}' PKGBUILD) +BUILD = makepkg --log --syncdeps --rmdeps --check define usage Available make targets: build Build $(PKG) but do not install - check Check shell scripts clean Cleanup build artifacts help Display this text install Build and install $(PKG) janitor Housekeeping remove Print command to uninstall $(PKG) and its orphaned dependencies + schk Check shell scripts endef -.PHONY: build check clean help janitor remove +.PHONY: build clean help janitor remove schk help: $(info $(usage)) @exit 0 clean: - rm -fr pkg src $(PKG)-*{log,gz,zst}* + rm -fr pkg src $(PKG)-*{log,zst}* build: .SRCINFO - makepkg --force --log --syncdeps --rmdeps + $(BUILD) -install: .SRCINFO - makepkg --force --log --syncdeps --rmdeps --install +install: + $(BUILD) --install remove: @echo -e "# Run the following only if you are certain:\nsudo pacman -Rs $(PKG)" @@ -37,7 +38,7 @@ remove: janitor: sort -o .gitignore .gitignore -check: +schk: shellcheck -s bash -e SC2034 PKGBUILD *.sh .SRCINFO: PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Morbius <archlinux@seichter.de> -pkgname=automx2 -pkgver=2022.1 +pkgname="automx2" +pkgver="2024.1" pkgrel=1 pkgdesc="Mail User Agent (email client) configuration made easy" backup=("etc/automx2/automx2.conf") @@ -11,7 +11,7 @@ makedepends=("python-build" "python-installer" "python-wheel") source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/${pkgname}/${pkgname}-${pkgver}.tar.gz" "automx2.conf" "automx2.service") -b2sums=('691ff333188d104f93f7cf9ee45d15d99212464a125bb4190341dda6b8165bd564d5b26b1e997ece8139606177e74caf24afe70a06786695c3f7fa21bec74c57' +b2sums=('9608fc25e2237aedfe1c71ebda981df159713066365712c94b49b83897b73f75fbafe83655b76afe860d9000d8bd1bb2e63c245cca6ba0710bbf391a7f545e81' 'e7afbacc9166556323f1c46f7bf65a906725cfce31f774f5bd47a5ab32102dacfd318c65c8524cf963918178097f8643b597c72db9514e131ee35d21e05240ce' 'add8bc242881dcb65f44c3d3c88f32818da01b6a1cec4e99f4c7665d9e7a36c59443a5cc6a8a04d70500d232d09be09eeb544c4da9fa70ec40be945ee0257be9') arch=("any") @@ -25,12 +25,21 @@ build() { popd >/dev/null || exit 1 } +check() { + pushd >/dev/null "${pkgname}-${pkgver}" || exit 1 + RUN_LDAP_TESTS=0 AUTOMX2_CONF=tests/unittest.conf python -m unittest discover -v tests/ + popd >/dev/null || exit 1 +} + # shellcheck disable=SC2154 package() { pushd >/dev/null "${pkgname}-${pkgver}" || exit 1 python -m installer --destdir="${pkgdir}" dist/*.whl - mkdir -p "${pkgdir}/etc/automx2" - install -D -m 0644 "${srcdir}/automx2.conf" "${pkgdir}/etc/automx2/automx2.conf" - install -D -m 0644 "${srcdir}/automx2.service" "${pkgdir}/usr/lib/systemd/system/automx2.service" + install -D -m 0644 "${srcdir}/${pkgname}.conf" "${pkgdir}/etc/${pkgname}/${pkgname}.conf" + install -D -m 0644 "${srcdir}/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service" + local x + for x in README* docs/*; do + install -D -m 0644 "${x}" "${pkgdir}/usr/share/doc/${pkgname}/$(basename ${x})" + done popd >/dev/null || exit 1 } diff --git a/install.sh b/install.sh index 7804c54d24dd..86fb6c59e1da 100644 --- a/install.sh +++ b/install.sh @@ -1,8 +1,8 @@ post_install() { u="automx2" - grep -q "^$u:" /etc/passwd && return - echo Creating user account $u - d="/var/lib/$u" - useradd -mrd $d $u - rm -fr $d/.* + grep -q "^${u}:" /etc/passwd && return + echo Creating user account ${u} + d="/var/lib/${u}" + useradd -mrd ${d} ${u} + rm -fr ${d}/.* } |