Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PKGBUILD #3

Merged
merged 9 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,12 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
print_hash: true

makepkg:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Makepkg Build and Check
uses: edlanglois/pkgbuild-action@v1
22 changes: 18 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Created by https://www.toptal.com/developers/gitignore/api/python
# Edit at https://www.toptal.com/developers/gitignore?templates=python
# Created by https://www.toptal.com/developers/gitignore/api/archlinuxpackages,python
# Edit at https://www.toptal.com/developers/gitignore?templates=archlinuxpackages,python

### ArchLinuxPackages ###
*.tar
*.tar.*
*.jar
*.exe
*.msi
*.zip
*.tgz
*.log
*.log.*
*.sig

pkg/
src/

### Python ###
# Byte-compiled / optimized / DLL files
Expand Down Expand Up @@ -60,7 +75,6 @@ cover/
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
Expand Down Expand Up @@ -173,4 +187,4 @@ poetry.toml
# LSP config files
pyrightconfig.json

# End of https://www.toptal.com/developers/gitignore/api/python
# End of https://www.toptal.com/developers/gitignore/api/archlinuxpackages,python
44 changes: 44 additions & 0 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Maintainer: Jake Howard <aur at theorangeone dot net>
pkgname=heroku-audit
pkgver=0.0.2
pkgrel=1
pkgdesc="Command-line tool for reporting on specific attributes of a Heroku environment."
url="https://github.com/torchbox/heroku-audit"
license=('BSD')
arch=('x86_64')
depends=(zlib readline xz openssl glibc expat bzip2 libffi util-linux-libs ncurses mpdecimal)
source=("https://github.com/torchbox/heroku-audit/archive/${pkgver}.tar.gz")
makedepends=(python-build python-wheel)
sha256sums=('0c539746c4b5dfb1ff8504e1a96394c3456666c866e0f0c1f7f54ef6f1242279')

build() {
cd "${srcdir}"/${pkgname}-${pkgver}

# Create a temporary virtualenv to install the build dependencies in
python -m venv venv
source venv/bin/activate

pip install -e . pyinstaller

venv/bin/pyinstaller -D --strip heroku_audit/__main__.py --name heroku-audit --clean --noconfirm
}

check() {
cd "${srcdir}"/${pkgname}-${pkgver}

./dist/heroku-audit/heroku-audit --version > /dev/null
./dist/heroku-audit/heroku-audit --list > /dev/null
}

package() {
cd "${srcdir}"/${pkgname}-${pkgver}

mkdir -p "${pkgdir}"/opt
cp -r dist/heroku-audit "${pkgdir}"/opt/heroku-audit

mkdir -p "${pkgdir}"/usr/bin/
ln -s /opt/heroku-audit/heroku-audit "${pkgdir}"/usr/bin/

install -Dm644 README.md "${pkgdir}"/usr/share/doc/${pkgname}/README.md
install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
Loading