summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ac847712f45e67ae7f2a59d5f7a9d668e17380ab (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# vim: set et sw=2:
# Maintainer: Brian Bidulock <bidulock@openss7.org>
# Contributor: Tom Gundersen <teg@jklm.no>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

_pkgname=ypserv
pkgname=ypserv-git
pkgver=4.2.r0.gbccf93b
pkgrel=1
pkgdesc='Linux NIS Server'
url="https://github.com/thkukuk/$_pkgname"
license=('GPL2')
arch=('i686' 'x86_64')
provides=("${_pkgname}=${pkgver%%.r*}-${pkgrel}")
conflicts=("${_pkgname}")
depends=('gawk' 'yp-tools' 'libsystemd' 'gdbm')
makedepends=('git' 'libxslt' 'libxml2' 'docbook-xml' 'docbook-xsl')
backup=('etc/ypserv.conf' 'etc/netgroup' 'etc/securenets' 'etc/yp/Makefile')
source=("$pkgname::git+$url"
        'ypxfrd.service'
        'ypserv.service'
        'yppasswdd.service'
        'ypxfr_1perday.service'
        'ypxfr_1perday.timer'
        'ypxfr_1perhour.service'
        'ypxfr_1perhour.timer'
        'ypxfr_2perday.service'
        'ypxfr_2perday.timer'
        'ypserv.conf')

pkgver() {
  cd $pkgname
  git describe --long --tags | sed -E 's,^[^0-9]*,,;s,([^-]*-g),r\1,;s,-,.,g'
}

prepare() {
  cd $pkgname
  sed -i -r -e '/AM_CFLAGS/s/ -Werror//' lib/Makefile.am
  sed -i -r -e 's,AC_CHECK_HEADERS\(crypt.h\),AC_CHECK_HEADERS([paths.h crypt.h]),' \
      configure.ac
  ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sbindir=/usr/bin
  make
}

package() {
  cd $pkgname
  make DESTDIR="${pkgdir}" install
  install -D -m644 etc/netgroup "${pkgdir}"/etc/netgroup
  install -D -m644 etc/ypserv.conf "${pkgdir}"/etc/ypserv.conf
  install -D -m644 etc/securenets "${pkgdir}"/etc/securenets
  install -D -m644 ../ypxfrd.service "${pkgdir}"/usr/lib/systemd/system/ypxfrd.service
  install -D -m644 ../ypserv.service "${pkgdir}"/usr/lib/systemd/system/ypserv.service
  install -D -m644 ../yppasswdd.service "${pkgdir}"/usr/lib/systemd/system/yppasswdd.service
  install -D -m644 ../ypxfr_1perday.service "${pkgdir}"/usr/lib/systemd/system/ypxfr_1perday.service
  install -D -m644 ../ypxfr_1perday.timer "${pkgdir}"/usr/lib/systemd/system/ypxfr_1perday.timer
  install -D -m644 ../ypxfr_1perhour.service "${pkgdir}"/usr/lib/systemd/system/ypxfr_1perhour.service
  install -D -m644 ../ypxfr_1perhour.timer "${pkgdir}"/usr/lib/systemd/system/ypxfr_1perhour.timer
  install -D -m644 ../ypxfr_2perday.service "${pkgdir}"/usr/lib/systemd/system/ypxfr_2perday.service
  install -D -m644 ../ypxfr_2perday.timer "${pkgdir}"/usr/lib/systemd/system/ypxfr_2perday.timer
  install -D -m644 "${pkgdir}"/var/yp/Makefile "${pkgdir}"/etc/yp/Makefile
  install -D -m644 ../ypserv.conf "${pkgdir}"/usr/lib/tmpfiles.d/ypserv.conf
  rm -fr "${pkgdir}/var"
}

md5sums=('SKIP'
         '0639cc2e8f667272335649eeede77206'
         '3428dcc728b2ac6c4edda9f43e834238'
         '9ff147310a5b83749357b6587cccdf34'
         'e774794de8a3d4aae4a07d23fcbe7075'
         'bbc9b0eca0027f30f7c662be293d214c'
         '921dce0c6735971f2526cf9ebff2805d'
         '742e15be6c75fffe6bd133176c6c6362'
         '19eb24bbe7c4fe6a877f489ab9dfdcb3'
         '0c232eb939198fc300f40159ba99f73a'
         'ee375afa24cdb5ffbf83c39aa2f08e54')