Skip to content

Commit 108a3d2

Browse files
🚿 CLEAN: Tidy file
PKGBUILD - Tidy variables: - Add custom variables: - "_prefix" - "_relname" - Change "pkgname" to ${_prefix}-${_relname} - Change "arch" from any to x86_6 4 - Expand arrays to multiple Lines - Create download link for upstream package - Create sha512sums o check upstream integrity - Use python build and install instead of pip as upstream archive has been pre-downloaded On branch main - Changes to be committed: - new file: .SRCINFO - modified: PKGBUILD
1 parent ab4ac64 commit 108a3d2

File tree

2 files changed

+68
-12
lines changed

2 files changed

+68
-12
lines changed

.SRCINFO

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
pkgbase = python-cysystemd
2+
pkgdesc = A SystemD wrapper on Cython
3+
pkgver = 1.5.2
4+
pkgrel = 1
5+
url = http://github.com/mosquito/cysystemd
6+
arch = any
7+
license = Apache
8+
makedepends = python
9+
makedepends = python-pip
10+
depends = cython
11+
source = https://files.pythonhosted.org/packages/source/c/cysystemd/cysystemd-1.5.2.tar.gz
12+
sha512sums = 51ce07ad0ce4d765bda89ae67e8eee9e59d246b38b3e3f7f9ee6d8802bba5b2fd67e59921a30f0c37447ebfa0567cdc2f1e846d0035c2b9364ad937483f3d79c
13+
14+
pkgname = python-cysystemd

PKGBUILD

Lines changed: 54 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,61 @@
1-
# PKGBUILD generated by pipman
2-
# Python package author: Dmitry Orlov <me@mosquito.su> <me@mosquito.su>
3-
pkgname=python-cysystemd
4-
pkgver=1.4.5
1+
#!/bin/bash
2+
3+
# Based on original PKGBUILD generated by pipman
4+
# Python package author, Dmitry Orlov <me@mosquito.su> <me@mosquito.su>
5+
6+
# Disable various shellcheck rules that produce false positives in this file.
7+
# Repository rules should be added to the .shellcheckrc file located in the
8+
# repository root directory, see https://github.com/koalaman/shellcheck/wiki
9+
# and https://archiv8.github.io for further information.
10+
# shellcheck disable=SC2034,SC2154
11+
# [ToDo]: Add files: User documentation
12+
# [ToDo]: Add files: Tooling
13+
# [FixMe]: Namcap warnings and errors
14+
15+
# Maintainer: Ross Clark <archiv8@artisteducator.com>
16+
# Contributor: Ross Clark <archiv8@artisteducator.com>
17+
18+
_prefix="python"
19+
_relname="cysystemd"
20+
21+
pkgname=${_prefix}-${_relname}
22+
pkgver=1.5.2
523
pkgrel=1
6-
pkgdesc="SystemD wrapper on Cython"
7-
arch=(any)
24+
pkgdesc="A SystemD wrapper on Cython"
25+
arch=(
26+
"x86_64"
27+
)
828
url="http://github.com/mosquito/cysystemd"
929
license=(Apache)
10-
depends=("cython")
11-
makedepends=("python" "python-pip")
30+
depends=(
31+
"cython"
32+
"systemd"
33+
)
34+
makedepends=(
35+
"python"
36+
"python-pip"
37+
)
38+
source=(
39+
"https://files.pythonhosted.org/packages/source/${_relname::1}/${_relname}/${_relname}-${pkgver}.tar.gz"
40+
)
41+
sha512sums=(
42+
"51ce07ad0ce4d765bda89ae67e8eee9e59d246b38b3e3f7f9ee6d8802bba5b2fd67e59921a30f0c37447ebfa0567cdc2f1e846d0035c2b9364ad937483f3d79c"
43+
)
44+
1245
build() {
13-
pip install --no-deps --target="cysystemd" cysystemd==$pkgver
46+
47+
cd "$srcdir/${_relname}-${pkgver}"
48+
49+
python setup.py build
50+
1451
}
52+
1553
package() {
16-
mkdir -p $pkgdir/usr/lib/python3.7/site-packages/
17-
cp -r $srcdir/cysystemd/* $pkgdir/usr/lib/python3.7/site-packages/
18-
}
1954

55+
cd "$srcdir/${_relname}-${pkgver}"
56+
57+
python setup.py install --root="$pkgdir/" --skip-build --optimize=1
58+
59+
install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
60+
61+
}

0 commit comments

Comments
 (0)