Advertisement
ImNtReal

389-ds-base-1.3.6.1-1

Mar 22nd, 2017
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.95 KB | None | 0 0
  1. # Maintainer:  Javier Torres <javitonino [at] gmail [dot] com>
  2. # Contributor: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
  3.  
  4. BUILD_SELINUX=false
  5.  
  6. pkgname=389-ds-base
  7. pkgver=1.3.6.1
  8. pkgrel=1
  9. pkgdesc="389 Directory Server (base)"
  10. arch=(i686 x86_64)
  11. url="http://port389.org/"
  12. license=(GPL)
  13. depends=(cyrus-sasl cyrus-sasl-gssapi icu lm_sensors net-snmp libsystemd
  14.          openldap perl-mozldap perl-netaddr-ip perl-socket 'svrcore>=4.1.2')
  15.  
  16. if [[ "${BUILD_SELINUX}" = "true" ]]; then
  17.   depends+=(selinux-usr-policycoreutils)
  18. fi
  19. backup=(etc/default/dirsrv
  20.         etc/default/dirsrv.systemd
  21.         etc/dirsrv/config/certmap.conf
  22.         etc/dirsrv/config/ldap-agent.conf
  23.         etc/dirsrv/config/slapd-collations.conf
  24.         etc/dirsrv/config/template-initconfig)
  25. options=(!libtool)
  26. install=${pkgname}.install
  27. source=("http://www.port389.org/binaries/${pkgname}-${pkgver}.tar.bz2")
  28. sha512sums=('aaccea52d95d0a6b453c04a4dccb7347312963d50b8ba72a32765ca6b86337c3038ed7481bb3cac2476471912789863f513f71ce6b88b9b58e51832df4117085')
  29.  
  30. build() {
  31.   cd "${pkgname}-${pkgver}"
  32.  
  33.   local selinux=""
  34.   if [[ "${BUILD_SELINUX}" = "true" ]]; then
  35.     selinux="--with-selinux"
  36.   fi
  37.  
  38.   if [[ "${CARCH}" = "x86_64" ]]; then
  39.     export USE_64=1
  40.   fi
  41.  
  42.   #autoreconf
  43.   ./autogen.sh
  44.  
  45.   ./configure \
  46.     --prefix=/usr \
  47.     --sysconfdir=/etc \
  48.     --sbindir=/usr/bin \
  49.     --localstatedir=/var \
  50.     --with-tmpfiles-d=/usr/lib/tmpfiles.d \
  51.     --with-systemd \
  52.     --with-systemdsystemunitdir=/usr/lib/systemd/system \
  53.     --with-systemdsystemconfdir=/etc/systemd/system \
  54.     --enable-autobind \
  55.     --with-openldap \
  56.     ${selinux} \
  57.     #--disable-static
  58.  
  59.   make
  60. }
  61.  
  62. check() {
  63.   cd "${pkgname}-${pkgver}"
  64.   make check
  65. }
  66.  
  67. package() {
  68.   cd "${pkgname}-${pkgver}"
  69.   make -j1 DESTDIR="${pkgdir}/" install
  70.  
  71.   install -dm755 "${pkgdir}"/var/log/${pkgname}/ \
  72.                  "${pkgdir}"/var/lib/${pkgname}/
  73.  
  74.   find "${pkgdir}" -type f -name '*.a' -delete
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement