initial import
This commit is contained in:
36
lockdev/PKGBUILD
Normal file
36
lockdev/PKGBUILD
Normal file
@@ -0,0 +1,36 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=lockdev
|
||||
pkgver=1.0.3_1.6
|
||||
_pkgver=1.0.3
|
||||
pkgrel=5
|
||||
pkgdesc="Run-time shared library for locking devices, using _both_ FSSTND and SVr4 methods"
|
||||
url='https://packages.qa.debian.org/l/lockdev.html'
|
||||
license=("LGPL-2.1")
|
||||
arch=('i686' 'x86_64')
|
||||
depends=('glibc')
|
||||
install=lockdev.install
|
||||
source=("https://deb.debian.org/debian/pool/main/l/${pkgname}/${pkgname}_${_pkgver}.orig.tar.gz"
|
||||
'build.patch'
|
||||
'gcc-4.7.patch')
|
||||
sha512sums=('4066985059add674ef8a9195e611db8ead89ca6191c04b7f29243b12a3448c82a3d0ea852bf99e26e1c71f163891acd198867650a5c4843f787e1944a8bc7f2b'
|
||||
'79ff3c22fbf38966310de99eefbc897c4f78b05c42d830ef3fc5ecb4234d81e58655bb2ab4564d7da0dbe04348ec496468b840a9992abe6b95b8b423916430ae'
|
||||
'c97ea9e3974d4eccc30472605a24f4393c60ada66ae5a0ad30502e3f939fb191a2772686241f0d12e417b33350edc015ec2d0238873031773ed6c39dbace0429')
|
||||
|
||||
prepare() {
|
||||
cd "${pkgname}-${_pkgver}"
|
||||
sed -i "s|CFLAGS = -g|CFLAGS = -g -fPIC|" Makefile
|
||||
patch -p1 -i $srcdir/build.patch
|
||||
patch -p1 -i $srcdir/gcc-4.7.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${pkgname}-${_pkgver}"
|
||||
make CFLAGS="${CFLAGS} -fPIC"
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${pkgname}-${_pkgver}"
|
||||
make basedir="${pkgdir}/usr" install
|
||||
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
}
|
||||
30
lockdev/build.patch
Normal file
30
lockdev/build.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
commit 0dd47123655c52d68185f06b9da8fb0e1b925400
|
||||
Author: Ludwig Nussel <ludwig.nussel@suse.de>
|
||||
Date: Tue Feb 9 14:56:23 2010 +0100
|
||||
|
||||
RedHat patch 2
|
||||
|
||||
- change library file name
|
||||
- install devel symlink
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index b7b4d1f..3b351dd 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -11,7 +11,7 @@ VER = $(shell expr `pwd` : '.*-\([0-9.]*\)')
|
||||
MVER = ${shell expr `pwd` : '.*-\([0-9]*\).[0-9]*'}
|
||||
|
||||
static = ${libname}.a
|
||||
-shared = ${libname}.${VER}.so
|
||||
+shared = ${libname}.so.${VER}
|
||||
soname = ${libname}.so.${MVER}
|
||||
|
||||
# overwritten by caller (e.g.: debian/rules)
|
||||
@@ -76,6 +76,7 @@ install_doc: docs/lockdev.3
|
||||
install_run: ${shared}
|
||||
install -m755 -d ${libdir}
|
||||
install -m644 ${shared} ${libdir}
|
||||
+ ln -s ${shared} ${libdir}/liblockdev.so
|
||||
|
||||
.PHONY: clean distclean perl-clean mostyclean
|
||||
perl-clean: clean
|
||||
18
lockdev/gcc-4.7.patch
Normal file
18
lockdev/gcc-4.7.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
diff -Naur lockdev-1.0.3.orig/src/ttylock.h lockdev-1.0.3/src/ttylock.h
|
||||
--- lockdev-1.0.3.orig/src/ttylock.h 2013-12-13 15:34:52.195877321 +0000
|
||||
+++ lockdev-1.0.3/src/ttylock.h 2013-12-13 15:38:16.131190480 +0000
|
||||
@@ -36,10 +36,10 @@
|
||||
|
||||
/* API of the library */
|
||||
|
||||
-int ttylock (char * devname);
|
||||
-int ttywait (char * devname);
|
||||
-int ttyunlock (char * devname);
|
||||
-int ttylocked (char * devname);
|
||||
+static inline int ttylock (char * devname);
|
||||
+static inline int ttywait (char * devname);
|
||||
+static inline int ttyunlock (char * devname);
|
||||
+static inline int ttylocked (char * devname);
|
||||
|
||||
|
||||
static inline int
|
||||
9
lockdev/lockdev.install
Normal file
9
lockdev/lockdev.install
Normal file
@@ -0,0 +1,9 @@
|
||||
post_install() {
|
||||
echo ">>> WARNING: Your user need to be in 'lock' and 'uucp' groups to connect to devices:"
|
||||
echo ">>> # gpasswd -a <your-user> lock"
|
||||
echo ">>> # gpasswd -a <your-user> uucp"
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
Reference in New Issue
Block a user