Adding packaging

This commit is contained in:
DarkFeather 2023-10-20 19:08:32 -05:00
parent ea75da1b41
commit 444b8171f5
Signed by: DarkFeather
GPG Key ID: 1CC1E3F4ED06F296
2 changed files with 22 additions and 15 deletions

View File

@ -1,24 +1,31 @@
pkgdirname != basename `git config remote.origin.url` | sed 's/.git$$//' pkgdirname != basename `git config remote.origin.url` | sed 's/.git$$//'
optlist = bin examples playbooks roles
compile: compile:
@echo Nothing to do @echo Nothing to do
install: clean install: clean compile
mkdir -p ${pkgdir}/opt/aninix/${pkgdirname}/ mkdir -p ${pkgdir}/opt/aninix/${pkgdirname}/
rsync -avzp HelloWorld* ${pkgdir}/opt/aninix/${pkgdirname}/ for opt in ${optlist}; do cp -pr $$opt ${pkgdir}/opt/aninix/${pkgdirname}/${opt}; done
make checkperm
test: compile test: compile
python3 -m pytest #python3 -m pytest
clean: clean:
cat .gitignore | xargs rm -Rf git clean -fdX
uninstall:
rm -Rf ${pkgdir}/opt/aninix/${pkgdirname}/
diff: diff:
@echo Nothing to do. @echo Nothing to do.
for opt in ${optlist}; do diff -r ${pkgdir}/opt/aninix/${pkgdirname}/${opt} $$opt; done
reverse: reverse:
@echo Nothing to do. for opt in ${optlist}; do rsync -avzlp ${pkgdir}/opt/aninix/${pkgdirname}/${opt}/ $$opt; done
checkperm: checkperm:
@echo Nothing to do. chown -R root: ${pkgdir}/opt/aninix/${pkgdirname}/
chmod 0755 ${pkgdir}/opt/aninix/${pkgdirname}/
chmod -R a+r ${pkgdir}/opt/aninix/${pkgdirname}/

View File

@ -1,19 +1,19 @@
depends=('bash>=4.4', 'ansible>=2.9')
makedepends=('make>=4.2')
checkdepends=()
optdepends=()
pkgname="$(git config remote.origin.url | rev | cut -f 1 -d '/' | rev | sed 's/.git$//')" 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)" pkgver="$(git describe --tag --abbrev=0)"."$(git rev-parse --short HEAD)"
pkgrel=1 pkgrel=1
pkgrel() { pkgrel() {
echo $(( `git log "$(git describe --tag --abbrev=0)"..HEAD | grep -c commit` + 1 )) git log "$(git describe --tag --abbrev=0)"..HEAD | grep -c commit
} }
epoch="$(git log | grep -c commit)" epoch=
pkgdesc="$(head -n 1 README.md)" pkgdesc="$(head -n 1 README.md)"
arch=("x86_64") arch=("x86_64")
url="$(git config remote.origin.url | sed 's/.git$//')" url="https://aninix.net/foundation/${pkgname}"
license=('custom') license=('custom')
groups=() groups=()
depends=('bash>=4.4' 'php' 'perl' 'jdk-openjdk>=18.0.1.1.u2-1' 'jre-openjdk-headless>=18.0.1.1.u2-1' 'python>=3.7')
makedepends=('make>=4.2' 'mono>5.0.0' 'gcc' 'python-pytest')
checkdepends=()
optdepends=()
provides=("${pkgname}") provides=("${pkgname}")
conflicts=() conflicts=()
replaces=("${pkgname,,}","aninix-${pkgname,,}") replaces=("${pkgname,,}","aninix-${pkgname,,}")