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 ca1942c
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions typo3scan/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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
python ./typo3scan.py --update
mkdir -p "${pkgdir}/opt/archpkgs/${pkgname}/${pkgname}"
cp -r ./typo3scan.py ./lib "${pkgdir}/opt/archpkgs/${pkgname}/${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}/typo3scan.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 ca1942c

Please sign in to comment.