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

recipes/utils/fcron/PAGBUILD.yaml main

97 linii Raw ← Powrót
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
pkgname: fcron
pkgver: '3.4.0'
pkgrel: '5'
pkgdesc: 'Feature-rich cron implementation'
url: 'http://fcron.free.fr'
arch: x86_64
depends: []
makedepends:
- vim
- pam
- libxcrypt
- readline
- systemd

source:
- 'http://fcron.free.fr/archives/${pkgname}-${pkgver}.src.tar.gz'

sha256sums:
- SKIP

hooks:
  'post-install': |
    name=fcron
    version=3.4.0
    release=5
    systemctl enable fcron
  'pre-install': |
    name=fcron
    version=3.4.0
    release=5
    INFO="\033[1;36m"
    NORMAL="\033[0;39m"
    
    SN="fcron"
    IDN="22"
    
    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 "Fcron User" -d /dev/null \
       -u $IDN -g $SN -s /usr/bin/false $SN
    fi

build: |
  SN="fcron"
  IDN="22"

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

  unset MAKEFLAGS
  cd ${pkgname}-${pkgver}
  find doc -type f -exec sed -i 's:/usr/local::g' {} \;
  unset MAKEFLAGS


  # brak sendmaila w PaganOS – wylaczamy wsparcie mailowe (inaczej configure
  # konczy sie: "File /bin/sendmail is not an executable file")
  ./configure --prefix=/usr \
  --sysconfdir=/etc  \
  --sbindir=/usr/bin \
  --with-sendmail=no \
  --localstatedir=/var    \
  --with-boot-install=no  \
  --mandir=/usr/share/man \
  --infodir=/usr/share/info \
  --with-piddir=/run \
  --with-answer-all=no

  make

  make DESTDIR=${PKGDIR} install

  mkdir -p ${PKGDIR}/etc/pam.d

  for i in fcron fcrontab
  do
      install -D -m644 files/fcron.pam ${PKGDIR}/etc/pam.d/$i
  done

  # Add cron.* directories

  for j in daily hourly monthly weekly
  do
      install -d -m755 ${PKGDIR}/etc/cron.$j
  done

package: |
  true