Skip to content

Commit

Permalink
add typo3scan
Browse files Browse the repository at this point in the history
Closes #44.
  • Loading branch information
dadevel committed Jun 24, 2024
1 parent 61cd324 commit df0ff88
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions typo3scan/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pkgname=typo3scan
pkgver=latest
pkgrel=1
url="https://github.com/whoot/${pkgname}.git"
arch=(any)
license=(GPL2)
depends=(python)
source=("git+${url}")
sha256sums=(SKIP)

package() {
cd "${srcdir}/${pkgname}"
mkdir -p "${pkgdir}"/opt/archpkgs/bin "${pkgdir}/opt/archpkgs/${pkgname}"
python -m venv "${pkgdir}/opt/archpkgs/${pkgname}"
declare -x VIRTUAL_ENV="${pkgdir}/opt/archpkgs/${pkgname}" PYTHONPATH="${pkgdir}/opt/archpkgs/${pkgname}" PATH="${pkgdir}/opt/archpkgs/${pkgname}/bin:$PATH"
pip install -r ./requirements.txt
cp -r ./lib "./${pkgname}.py" "${pkgdir}/opt/archpkgs/${pkgname}"
cat << EOF > "${pkgdir}/opt/archpkgs/bin/${pkgname}"
#!/bin/sh
set -eu
export VIRTUAL_ENV=/opt/archpkgs/${pkgname} PYTHONPATH=/opt/archpkgs/${pkgname} PATH="/opt/archpkgs/${pkgname}/bin:\$PATH"
exec python /opt/archpkgs/${pkgname}/${pkgname}.py "\$@"
EOF
chmod +x "${pkgdir}/opt/archpkgs/bin/${pkgname}"
}

pkgver() {
cd "${srcdir}/${pkgname}"
echo "$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

0 comments on commit df0ff88

Please sign in to comment.