Shifting tracking of package metadata mostly to git; cleaning depends; efficiency update in testing
This commit is contained in:
parent
7376f12a27
commit
216021b633
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,7 +1,7 @@
|
||||
HelloWorld
|
||||
HelloWorld.class
|
||||
HelloWorld.exe
|
||||
tests/__pycache__/*
|
||||
tests/__pycache__
|
||||
*.tar.xz
|
||||
pkg/
|
||||
src/
|
||||
|
8
Makefile
8
Makefile
@ -1,6 +1,8 @@
|
||||
compile: c cs java bash php perl python
|
||||
pkgdirname != basename `git config remote.origin.url` | sed 's/.git$$//'
|
||||
|
||||
compile: c cs java bash php perl python
|
||||
@echo Done
|
||||
|
||||
install: clean
|
||||
mkdir -p ${pkgdir}/opt/aninix/${pkgdirname}/
|
||||
rsync -avzp HelloWorld* ${pkgdir}/opt/aninix/${pkgdirname}/
|
||||
@ -8,8 +10,8 @@ install: clean
|
||||
test: compile
|
||||
python3 -m pytest
|
||||
|
||||
clean:
|
||||
cat .gitignore | xargs -n 1 rm -Rf
|
||||
clean:
|
||||
cat .gitignore | xargs rm -Rf
|
||||
|
||||
diff:
|
||||
@echo Nothing to do.
|
||||
|
30
PKGBUILD
30
PKGBUILD
@ -1,23 +1,22 @@
|
||||
# Maintainer: Shikoba Kage <darkfeather@aninix.net>
|
||||
pkgname=helloworld
|
||||
pkgver=0.1.4310ab732341ac3317c9aa706b3058b8e7162486
|
||||
pkgver() {
|
||||
printf "0.1.""$(git rev-parse HEAD)"
|
||||
}
|
||||
pkgname="$(git config remote.origin.url | rev | cut -f 1 -d '/' | rev | sed 's/.git$//' | tr '[[:upper:]]' '[[:lower:]]')"
|
||||
pkgver="$(git describe --tag --abbrev=0)"."$(git rev-parse --short HEAD)"
|
||||
pkgrel=1
|
||||
pkgrel() {
|
||||
git log "$(git describe --tag --abbrev=0)"..HEAD | grep -c commit
|
||||
}
|
||||
epoch=
|
||||
pkgdesc="AniNIX::HelloWorld \\\\ Sample HelloWorld Source"
|
||||
pkgdesc="$(head -n 1 README)"
|
||||
arch=("x86_64")
|
||||
url="https://aninix.net/foundation/HelloWorld"
|
||||
url="https://aninix.net/foundation/${pkgname}"
|
||||
license=('custom')
|
||||
groups=()
|
||||
depends=('bash>=4.4')
|
||||
makedepends=('make>=4.2' 'mono>5.0.0' 'php' 'perl' 'java-environment' 'python>=3.7' 'gcc')
|
||||
depends=('bash>=4.4' 'php' 'perl' 'java-environment' 'python>=3.7')
|
||||
makedepends=('make>=4.2' 'mono>5.0.0' 'gcc')
|
||||
checkdepends=()
|
||||
optdepends=()
|
||||
provides=('helloworld')
|
||||
provides=("${pkgname}")
|
||||
conflicts=()
|
||||
replaces=('aninix-helloworld')
|
||||
replaces=()
|
||||
backup=()
|
||||
options=()
|
||||
install=
|
||||
@ -32,13 +31,12 @@ prepare() {
|
||||
}
|
||||
|
||||
build() {
|
||||
git config remote.origin.url
|
||||
make -C ..
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "${srcdir}/.."
|
||||
chmod a+r "${srcdir}/../pkg"
|
||||
make test
|
||||
chmod -R u+r ../pkg
|
||||
make -C .. test
|
||||
}
|
||||
|
||||
package() {
|
||||
|
2
README
2
README
@ -1 +1,3 @@
|
||||
AniNIX::HelloWorld \\ Sample HelloWorld Source
|
||||
|
||||
This project is enabled for AniNIX::Foundation. You can check it out remotely with the git package. It is intended to display example source for all of our projects.
|
||||
|
@ -2,28 +2,26 @@ import os
|
||||
import re
|
||||
import shutil
|
||||
|
||||
# c cs java bash php perl python
|
||||
|
||||
def CheckOutput(output):
|
||||
return output == 'Hello world!\n'
|
||||
|
||||
def test_c():
|
||||
print(os.getcwd())
|
||||
fh = os.popen("make c &>/dev/null; ./HelloWorld", mode='r', buffering=-1)
|
||||
fh = os.popen("./HelloWorld", mode='r', buffering=-1)
|
||||
output = fh.read()
|
||||
retcode = fh.close()
|
||||
assert retcode == None and CheckOutput(output)
|
||||
|
||||
def test_cs():
|
||||
print(os.getcwd())
|
||||
fh = os.popen("make cs &>/dev/null; mono ./HelloWorld.exe", mode='r', buffering=-1)
|
||||
fh = os.popen("mono ./HelloWorld.exe", mode='r', buffering=-1)
|
||||
output = fh.read()
|
||||
retcode = fh.close()
|
||||
assert retcode == None and CheckOutput(output)
|
||||
|
||||
def test_java():
|
||||
print(os.getcwd())
|
||||
fh = os.popen("make java &>/dev/null; java HelloWorld", mode='r', buffering=-1)
|
||||
fh = os.popen("java HelloWorld", mode='r', buffering=-1)
|
||||
output = fh.read()
|
||||
retcode = fh.close()
|
||||
assert retcode == None and CheckOutput(output)
|
||||
|
Loading…
Reference in New Issue
Block a user