PKGBUILD 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Maintainer: Márcio Silva <coadde@hyperbola.info>
  2. # Contributor: Tobias Dausend <throgh@hyperbola.info>
  3. pkgname=vlock
  4. pkgver=2.2.2
  5. _debver=$pkgver
  6. _debrel=10
  7. pkgrel=2
  8. pkgdesc="Virtual Console locking program"
  9. arch=('i686' 'x86_64')
  10. url='https://packages.debian.org/source/bullseye/$pkgname'
  11. license=('GPL-2')
  12. depends=('shadow')
  13. makedepends=('quilt')
  14. source=("https://deb.debian.org/debian/pool/main/v/$pkgname/${pkgname}_${pkgver}.orig.tar.gz"
  15. "https://deb.debian.org/debian/pool/main/v/$pkgname/${pkgname}_${_debver}-${_debrel}.debian.tar.xz")
  16. sha512sums=('694da52fba3a73f342c4217f6e3556e8c49cab6a991f0a3b96f6adfdb4a718e8e66ce9b5cc83f74475675a9d31d3956545acd11decf9e3b2db61df53ae863b52'
  17. '5aabc89f111f6a08f868aa2d3dd37fd7a09a8f0245850cccd7a1c1f2bbc3eeeb13c45222f4cfd6bf7f3a35d1dce910ed53103aae27da16195185a88597247499')
  18. prepare() {
  19. cd ${srcdir}/${pkgname}-${pkgver}
  20. if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
  21. # Debian patches
  22. export QUILT_PATCHES=debian/patches
  23. export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
  24. export QUILT_DIFF_ARGS='--no-timestamps'
  25. mv "$srcdir"/debian .
  26. quilt push -av
  27. fi
  28. }
  29. build() {
  30. cd ${srcdir}/${pkgname}-${pkgver}
  31. ./configure \
  32. VLOCK_GROUP=root \
  33. --prefix=/usr \
  34. --enable-shadow
  35. sed -i 's/new\.so//' config.mk
  36. make
  37. }
  38. package() {
  39. cd ${srcdir}/${pkgname}-${pkgver}
  40. # current makefile contains errors
  41. make DESTDIR=${pkgdir} install
  42. # fix modules permissions
  43. chmod 0755 ${pkgdir}/usr/lib/vlock/modules/*.so
  44. # license
  45. install -Dm644 COPYING -t ${pkgdir}/usr/share/licenses/${pkgname}
  46. }