summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 76b9fe2134319ab42f0993d28fc211679b0fb752 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Maintainer: nightuser <nightuser.android@gmail.com>

pkgname=podman-compose-git
pkgver=1.0.7.r161.6103df7
pkgrel=1
epoch=1
pkgdesc="A script to run docker-compose.yml using podman"
arch=('any')
url="https://github.com/containers/podman-compose"
license=('GPL2')
depends=('podman' 'python-yaml' 'python-dotenv')
makedepends=('git' 'python-setuptools')
optdepends=('podman-dnsname: the containers will be able to resolve each other if they are on the same CNI network')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("${pkgname%-git}::git+https://github.com/containers/podman-compose")
sha256sums=('SKIP')

pkgver() {
  cd "${srcdir}/${pkgname%-git}"
  printf "%s.%s" \
    "$(grep -Po "(?<=__version__ = ).*" podman_compose.py | xargs)" \
    "$(git describe --long | sed -e "s/^$(git describe --abbrev=0)-//" -e 's/\([^-]*-\)g/r\1/;s/-/./g')"
  # Alt. way of getting version number:
  # "$(python -c 'from podman_compose import __version__; print(__version__)')"
}

build() {
  cd "${srcdir}/${pkgname%-git}"
  python setup.py build
}

package() {
  cd "${srcdir}/${pkgname%-git}"
  python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
}

# vim: set et ts=2 sw=2: