diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-03-06 03:42:24 +0000 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-03-06 03:42:24 +0000 |
commit | c183da9d3df5445f5021cd6563012ba2abfc393e (patch) | |
tree | 825211c0af8ca26a450f4bdeeb58ccfbb88e13df /extra/libspnav | |
parent | 4f7963b7ddc283ae57ceb68e7f4d51b3994e0070 (diff) |
Thu Mar 6 03:38:39 UTC 2014
Diffstat (limited to 'extra/libspnav')
-rw-r--r-- | extra/libspnav/Makefile.patch | 51 | ||||
-rw-r--r-- | extra/libspnav/PKGBUILD | 34 |
2 files changed, 85 insertions, 0 deletions
diff --git a/extra/libspnav/Makefile.patch b/extra/libspnav/Makefile.patch new file mode 100644 index 000000000..295c5403a --- /dev/null +++ b/extra/libspnav/Makefile.patch @@ -0,0 +1,51 @@ +--- libspnav-0.2.2/Makefile.in 2010-03-28 00:24:27.000000000 +0100 ++++ a/trunk/libspnav/Makefile.in 2014-03-05 15:33:07.590597866 +0100 +@@ -4,10 +4,12 @@ + lib_a = libspnav.a + soname = libspnav.so.0 + lib_so = $(soname).1 ++devlink = libspnav.so + + CC = gcc + AR = ar +-CFLAGS = $(opt) $(dbg) -std=c89 -fpic -pedantic -Wall -fno-strict-aliasing -I. ++CFLAGS = $(opt) $(dbg) -std=c89 -fpic -pedantic -Wall -fno-strict-aliasing -I. -I/usr/local/include $(user_cflags) ++LDFLAGS = $(user_ldflags) + + .PHONY: all + all: $(lib_a) $(lib_so) +@@ -16,7 +18,7 @@ + $(AR) rcs $@ $(obj) + + $(lib_so): $(obj) +- $(CC) -shared -Wl,-soname,$(soname) -o $@ $(obj) ++ $(CC) -shared -Wl,-soname,$(soname) -o $@ $(obj) $(LDFLAGS) + + %.o: $(srcdir)/%.c + $(CC) $(CFLAGS) -c $< -o $@ +@@ -31,13 +33,19 @@ + + .PHONY: install + install: $(lib_a) $(lib_so) +- cp $(lib_a) $(PREFIX)/$(libdir)/$(lib_a) +- cp $(lib_so) $(PREFIX)/$(libdir)/$(lib_so) +- for h in $(hdr); do cp -p $(srcdir)/$$h $(PREFIX)/include/; done ++ mkdir -p $(DESTDIR)$(PREFIX)/$(libdir) $(DESTDIR)$(PREFIX)/include ++ cp $(lib_a) $(DESTDIR)$(PREFIX)/$(libdir)/$(lib_a) ++ cp $(lib_so) $(DESTDIR)$(PREFIX)/$(libdir)/$(lib_so) ++ rm -f $(DESTDIR)$(PREFIX)/$(libdir)/$(soname) $(DESTDIR)$(PREFIX)/$(libdir)/$(devlink) ++ ln -s $(PREFIX)/$(libdir)/$(lib_so) $(DESTDIR)$(PREFIX)/$(libdir)/$(soname) ++ ln -s $(PREFIX)/$(libdir)/$(soname) $(DESTDIR)$(PREFIX)/$(libdir)/$(devlink) ++ for h in $(hdr); do cp -p $(srcdir)/$$h $(DESTDIR)$(PREFIX)/include/; done + + .PHONY: uninstall + uninstall: +- rm -f $(PREFIX)/$(libdir)/$(lib_a) +- rm -f $(PREFIX)/$(libdir)/$(lib_so) +- for i in $(hdr); do rm -f $(PREFIX)/include/$$i; done ++ rm -f $(DESTDIR)$(PREFIX)/$(libdir)/$(lib_a) ++ rm -f $(DESTDIR)$(PREFIX)/$(libdir)/$(lib_so) ++ rm -f $(DESTDIR)$(PREFIX)/$(libdir)/$(soname) ++ rm -f $(DESTDIR)$(PREFIX)/$(libdir)/$(devlink) ++ for i in $(hdr); do rm -f $(DESTDIR)$(PREFIX)/include/$$i; done + diff --git a/extra/libspnav/PKGBUILD b/extra/libspnav/PKGBUILD new file mode 100644 index 000000000..4cae4c768 --- /dev/null +++ b/extra/libspnav/PKGBUILD @@ -0,0 +1,34 @@ +# $Id: PKGBUILD 206885 2014-03-05 14:38:41Z andrea $ +# Maintainer: Andrea Scarpino <andrea@archlinux.org> +# Contributor: Jan Hambrecht <jaham at gmx dot net> + +pkgname=libspnav +pkgver=0.2.2 +pkgrel=5 +pkgdesc="Alternative to the proprietary 3Dconnexion device driver and SDK for their 3D input devices" +arch=('i686' 'x86_64') +url="http://spacenav.sourceforge.net/" +license=('GPL') +depends=('glibc') +makedepends=('libx11') +source=("http://downloads.sourceforge.net/spacenav/$pkgname-$pkgver.tar.gz" + 'Makefile.patch') +md5sums=('b85a0f4ab711e2d4f73a40e2e371f5ae' + 'cc008ea9f5e1abb870c0e2dbc86c3b86') + +prepare() { + cd ${pkgname}-${pkgver} + patch -p1 -i "${srcdir}"/Makefile.patch +} + +build() { + cd ${pkgname}-${pkgver} + ./configure --prefix=/usr \ + --disable-debug + make +} + +package() { + cd ${pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install +} |