summaryrefslogtreecommitdiff
path: root/community/lockdev/PKGBUILD
blob: 7ad656779eaee10677b533e92439cad5a2d5ac17 (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
# $Id: PKGBUILD 76820 2012-09-30 13:49:03Z lfleischer $
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Andreas Wagner <a.wagner@stud.uni-frankfurt.de>

pkgname=lockdev
pkgver=1.0.3_1.5
_pkgver=1.0.3
pkgrel=1
pkgdesc='Run-time shared library for locking devices, using _both_ FSSTND and SVr4 methods.'
url='http://packages.qa.debian.org/l/lockdev.html'
license=("GPL")
arch=('i686' 'x86_64' 'mips64el')
source=("http://ftp.debian.org/debian/pool/main/l/${pkgname}/${pkgname}_${_pkgver}.orig.tar.gz"
	      "http://ftp.debian.org/debian/pool/main/l/${pkgname}/${pkgname}_${pkgver/_/-}.diff.gz")
md5sums=('64b9c1b87b125fc348e892e24625524a'
         'c4e8a5a2e46b76b48339c232b358f579')

build() {
  cd "${pkgname}-${_pkgver}"

  patch -p1 -i "../${pkgname}_${pkgver/_/-}.diff"
  sed -i "s|CFLAGS	= -g|CFLAGS	= -g -fPIC|" Makefile

  make shared CFLAGS="${CFLAGS} -D_PATH_LOCK=\\\"/run/lock/lockdev\\\""
  make static CFLAGS="${CFLAGS} -D_PATH_LOCK=\\\"/run/lock/lockdev\\\""
}

package() {
  cd "${pkgname}-${_pkgver}"
  make basedir="${pkgdir}/usr" install
}