summaryrefslogtreecommitdiff
path: root/pcr/initify/PKGBUILD
blob: 317208098a6d4f296603dd8683d72c0edc0238a5 (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
39
40
41
42
43
44
45
46
# Maintainer (aur): TBK <aur at jjtc dot eu>
# Contributor: bill-auger <bill-auger@programmer.net>


pkgname=initify
_gitver=f9ccbb147924a2371a1ae5a925c1be6858cca5fa
pkgver=0.0.0.pre.${_gitver:0:7}
pkgrel=3
pkgdesc="Convert systemd services to OpenRC init-scripts"
arch=(any)
url=https://github.com/goose121/initify/
license=(custom:MIT)

makedepends=(git)
depends=(perl)
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/goose121/${pkgname}/archive/${_gitver}.tar.gz)
source+=(trim_path_from_service_name.patch
         validate_args.patch)

sha256sums=('24709e6f243247a83826b662d6e8431eca223ef5aaccf75a09d5dbf7dde81539')
sha256sums+=('e105a8d8e7074050fa192ea139382c75a5cafda83275376dd6cd21779a80ca5d'
             'b82a63fda947af397f8d60ad4049d3aba279817360f4acaeb3e684278016a711')


prepare()
{
  cd "${srcdir}"/${pkgname}-${_gitver}/

  # https://github.com/goose121/initify/issues/2
  echo "applying trim_path_from_service_name.patch"
  patch -p1 < "${srcdir}"/trim_path_from_service_name.patch

  # https://github.com/goose121/initify/issues/2
  echo "applying validate_args.patch"
  patch -p1 < "${srcdir}"/validate_args.patch
}

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

  install -Dm755 cronify.pl "${pkgdir}"/usr/bin/cronify
  install -Dm755 initify.pl "${pkgdir}"/usr/bin/initify
  install -Dm644 README.md  "${pkgdir}"/usr/share/doc/${pkgname}/README.md
  install -Dm644 LICENSE    "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}