From d876823f0b0631f5de84addaa397b4fa924cc575 Mon Sep 17 00:00:00 2001 From: DarkFeather Date: Mon, 23 Oct 2023 13:09:05 -0500 Subject: [PATCH] Hooks requirements --- .gitignore | 91 ++++++------------------------------------------------ LICENSE | 62 ++++++++++++++++++------------------- Makefile | 27 ++++++++++++++++ PKGBUILD | 46 +++++++++++++++++++++++++++ 4 files changed, 113 insertions(+), 113 deletions(-) create mode 100644 Makefile create mode 100644 PKGBUILD diff --git a/.gitignore b/.gitignore index 92d3100..88b475a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,15 @@ -venv/ +# Subdocs +wiki/ + +# Build +pkg/ +*.pkg.tar.zst # ---> Python # Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so +**/__pycache__/ +**/*.py[cod] +**/*$py.class # Distribution / packaging .Python @@ -33,62 +35,6 @@ MANIFEST # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -.hypothesis/ -.pytest_cache/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -.python-version - -# celery beat schedule file -celerybeat-schedule - -# SageMath parsed files -*.sage.py - # Environments .env .venv @@ -97,22 +43,3 @@ venv/ ENV/ env.bak/ venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - diff --git a/LICENSE b/LICENSE index bffb679..e15653d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,31 +1,31 @@ -# http://www.wtfpl.net/about/ - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2004 Sam Hocevar - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. - - ANINIX ADDENDUM - - Trademark 2017 (https://aninix.net/) - - The "AniNIX" name and |> logo are trademarked as of 2017/11/21. - AniNIX materials may be reproduced and re-used (though you must - contact the admins of the network to get written permission to use - the AniNIX name or logo) so long as such reproduction or re-use - does not inhibit the original AniNIX use of the same. - - Attribution is appreciated for other materials but not legally - required or necessary. - - "AniNIX" trademark serial: 87177883 - |> Logo trademark serial: 87177887 +# http://www.wtfpl.net/about/ + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + + ANINIX ADDENDUM + + Trademark 2017 (https://aninix.net/) + + The "AniNIX" name and |> logo are trademarked as of 2017/11/21. + AniNIX materials may be reproduced and re-used (though you must + contact the admins of the network to get written permission to use + the AniNIX name or logo) so long as such reproduction or re-use + does not inhibit the original AniNIX use of the same. + + Attribution is appreciated for other materials but not legally + required or necessary. + + "AniNIX" trademark serial: 87177883 + |> Logo trademark serial: 87177887 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5346718 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +compile: + @echo Nothing to compile. + +install: compile + mkdir -p ${pkgdir}/opt/aninix/Wiki + for i in `git ls-files | sort | grep -vE '^.gitignore$$|^PKGBUILD$$|^LICENSE$$|^Makefile$$'`; do mkdir -p ${pkgdir}/opt/aninix/Wiki/"$$(dirname "$$i")"; cp -pr "$$i" ${pkgdir}/opt/aninix/Wiki/"$$i"; done + make checkperm + +clean: + git clean -fdX + +uninstall: + rm -Rf ${pkgdir}/opt/aninix/Wiki + +test: + true # Nothing to test + +checkperm: + chown -R root: ${pkgdir}/opt/aninix/Wiki + chmod -R 0640 ${pkgdir}/opt/aninix/Wiki + find ${pkgdir}/opt/aninix/Wiki -type d -exec chmod a+x {} \; + +diff: + true + +reverse: + true diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..f3a617d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +depends=('bash>=4.4') +makedepends=('make>=4.2','gcc','mono') +checkdepends=() +optdepends=() +pkgname="$(git config remote.origin.url | rev | cut -f 1 -d '/' | rev | sed 's/.git$//')" +pkgver="$(git describe --tag --abbrev=0)"."$(git rev-parse --short HEAD)" +pkgrel=1 +pkgrel() { + echo $(( `git log "$(git describe --tag --abbrev=0)"..HEAD | grep -c commit` + 1 )) +} +epoch="$(git log | grep -c commit)" +pkgdesc="$(head -n 1 README.md)" +arch=("x86_64") +url="$(git config remote.origin.url | sed 's/.git$//')" +license=('custom') +groups=() +provides=("${pkgname}") +conflicts=() +replaces=("${pkgname,,}", "aninix-${pkgname,,}") +backup=() +options=() +install= +changelog= +source=() +noextract=() +md5sums=() +validpgpkeys=() + +prepare() { + git pull +} + +build() { + make -C .. +} + +check() { + chmod -R u+r ../pkg + make -C .. test +} + +package() { + export pkgdir="${pkgdir}" + make -C .. install + install -D -m644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +}