🔒 Repository is read-only – file editing is disabled.

recipes/utils/stunnel/PAGBUILD.yaml main

69 linii Raw ← Powrót
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
pkgname: stunnel
pkgver: '5.80'
pkgrel: '1'
pkgdesc: 'Encrypt arbitrary TCP connections inside SSL so you can communicate over secure channels'
url: 'https://www.stunnel.org'
arch: x86_64
depends: []
makedepends: []
source:
- 'https://www.stunnel.org/downloads/${pkgname}-${pkgver}.tar.gz'
- 'stunnel.conf'

sha256sums:
- SKIP
- SKIP

hooks:
  'post-install': |
    name=stunnel
    version=5.80
    release=1
    install -v -m750 -o stunnel -g stunnel -d var/lib/stunnel/run 
    chown stunnel:stunnel var/lib/stunnel
  'pre-install': |
    name=stunnel
    version=5.80
    release=1
    INFO="\033[1;36m"
    NORMAL="\033[0;39m"
    
    SN="stunnel"
    IDN="51"
    
    if ! (getent group $SN > /dev/null); then
       printf "${INFO}Creating $SN group${NORMAL}\n"
       groupadd -g $IDN $SN
    fi
    if ! (getent passwd $SN > /dev/null); then
       printf "${INFO}Creating $SN user${NORMAL}\n"
       useradd -c "stunnel Daemon" -d /var/lib/$SN \
       -u $IDN -g $SN -s /bin/false $SN
    fi

build: |
  SN="stunnel"
  IDN="51"

  if ! (getent group $SN > /dev/null); then
     groupadd -g $IDN $SN
  fi
  if ! (getent passwd $SN > /dev/null); then
     useradd -c "stunnel Daemon" -d /var/lib/$SN \
     -u $IDN -g $SN -s /bin/false $SN
  fi

  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr \
  	--sysconfdir=/etc \
  	--localstatedir=/var
  make
  make DESTDIR=${PKGDIR} install

  install -v -m750 -d ${PKGDIR}/etc/stunnel
  # stunnel.conf to osobne źródło receptury – pagbuild kopiuje je do katalogu
  # źródeł (src/), więc z katalogu builda (cd ${pkgname}-${pkgver}) bierzemy ../
  cp -v ../stunnel.conf ${PKGDIR}/etc/stunnel/stunnel.conf

package: |
  true