upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / openpgp-ca / trunk / PKGBUILD
blob99f9f79e779daf2ddd169518bc7314bd39f8fe96
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 pkgbase=openpgp-ca
4 pkgname=(openpgp-ca openpgp-ca-restd)
5 pkgver=0.12.0
6 pkgrel=1
7 pkgdesc="Tool to handle OpenPGP keys in groups or organizations"
8 arch=(x86_64)
9 url="https://openpgp-ca.org/"
10 license=(GPL3)
11 depends=(gcc-libs glibc gmp)
12 makedepends=(bzip2 clang nettle openssl pcsclite rust sqlite systemd)
13 source=(
14   https://gitlab.com/openpgp-ca/openpgp-ca/-/archive/$pkgname/v$pkgver/$pkgname-$pkgname-v$pkgver.tar.gz
15   openpgp-ca-restd.env
16   openpgp-ca-restd.service
17   openpgp-ca-restd.sysusers
18   openpgp-ca-restd.tmpfiles
20 sha512sums=('1710321a72ab589d41ffa084e0b1f281b94c39fca0d82c8dd8059945523ba28fb93a0494c66a73d461eb6e3ef0668d247ca43ba48cc45bebfd982fa06e93665d'
21             'b32aaf7853565981b96b391972f930d1a910ef879a129643ac6b482292ea6dc30c374bf89ebab09b77ffd56b1f78bafd7d9069e6233e7ba8a21cfcfefe87e453'
22             'ae86d00c7128d4849ab52b7371f945c034297a79e849071c0ce3a34714e3f9e8eb174f3fb2d8e6781119dc5064712b8f6d1f064c041f72fdb102eff1393e0911'
23             'cc45e554f834f0e9ba2bc31bfb297b7ff52d291648b216b53b70af84a303877f21b74e4e4b1b6cd2464b98884afc072a62fe4aede4102b543ec79b60ebf21281'
24             'b5421457ab3a799643b6f7bd4851d093ed74b91070cc29a3730c3ce54b118867b2dcce6acf203acce050b5506da7ed7423ddf8c062d21c3ce76b19678230546e')
25 b2sums=('58b93f368bd9c58e44649aaa730f3bf97cd9af08ad1db8fe26ceda861fae9f5b14f41be418065555379ab5d9cef0bdf5d9ac23a3b2daaeb2e89b9c8a54711e62'
26         '33a3961cb5ed248b75cc7bc744c38be385fd43ed0350d7137e0b11055ee2a76f8191d5d373235a9621c0083d6bf82e2c6eb6bf58bc82a2df88bdfb307f663cda'
27         'b63d28d69cca8a983d9c034ab7c7da9619dd71c36cf1e57bcfa8bc0ea2610a9693164e506b6cd359055b179550b64501fd18faf26065cebead6fe804c947295d'
28         'fd5b286b752f73ff7b5558f54397607bfcddd421cc3da45355ffd3f852e99dc887284e8401463779ec005609ae4e01c74200df90a0d206b47ad68785423e8b48'
29         '893dffa33c043f36201b2a8926871528c667a891f3dc4fd92dab1c6a0373d224dd7d5f6082f0425049364283525c9c57e979a95e26001ac02b62760a66aa3554')
31 prepare() {
32   cd $pkgbase-$pkgbase-v$pkgver
33   # NOTE: add --locked as soon as upstream has split out the components
34   cargo fetch --target "$CARCH-unknown-linux-gnu"
37 build() {
38   cd $pkgbase-$pkgbase-v$pkgver
39   export RUSTUP_TOOLCHAIN=stable
40   export CARGO_TARGET_DIR=target
41   cargo build --frozen --release --all-features
44 # tests are unfortunately broken in our packaging environment
45 # check() {
46 #   cd $pkgbase-$pkgbase-v$pkgver
47 #   export RUSTUP_TOOLCHAIN=stable
48 #   cargo test --frozen --all-features
49 # }
51 package_openpgp-ca() {
52   depends+=(
53     bzip2 libbz2.so
54     openssl libcrypto.so libssl.so
55     nettle libhogweed.so libnettle.so
56     pcsclite libpcsclite.so
57     sqlite libsqlite3.so
58   )
60   cd $pkgbase-$pkgbase-v$pkgver
61   install -vDm 755 target/release/oca -t "$pkgdir/usr/bin/"
62   install -vDm 644 README.md -t "$pkgdir/usr/share/doc/$pkgbase/"
65 package_openpgp-ca-restd() {
66   pkgdesc+=" - REST service"
67   depends+=(
68     bzip2 libbz2.so
69     openssl libcrypto.so libssl.so
70     nettle libhogweed.so libnettle.so
71     pcsclite libpcsclite.so
72     sqlite libsqlite3.so
73   )
74   optdepends=('openpgp-ca: for creating and modifying databases')
75   install=$pkgname.install
77   install -vDm 644 $pkgname.env "$pkgdir/etc/$pkgname/env"
78   install -vDm 644 $pkgname.service -t "$pkgdir/usr/lib/systemd/system/"
79   install -vDm 644 $pkgname.sysusers "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
80   install -vDm 644 $pkgname.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
82   cd $pkgbase-$pkgbase-v$pkgver
83   install -vDm 755 target/release/openpgp-ca-restd -t "$pkgdir/usr/bin/"