2.0 libspnav

This commit is contained in:
root
2015-09-13 16:24:34 +03:00
parent bf2bcf391d
commit a0a4ebf8db
5 changed files with 217 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
def setup():
autotools.configure("--enable-opt --enable-ldopt")
def build():
autotools.make()
def install():
pisitools.insinto("/usr/lib/", "*.so*")
pisitools.dosym("libspnav.so.0.1", "/usr/lib/libspnav.so.0")
pisitools.domove("/usr/lib/libspnav.so.0.1", "/usr/lib", "libspnav.so")
pisitools.insinto("/usr/lib/", "*.so*")
pisitools.insinto("/usr/include/", "*.h")
pisitools.dodoc("README")
@@ -0,0 +1,75 @@
diff -Npur libspnav-0.2.2.orig/Makefile.in libspnav-0.2.2/Makefile.in
--- libspnav-0.2.2.orig/Makefile.in 2012-01-31 22:34:01.448356249 +0100
+++ libspnav-0.2.2/Makefile.in 2012-01-31 22:39:20.229350669 +0100
@@ -7,7 +7,8 @@ lib_so = $(soname).1
CC = gcc
AR = ar
-CFLAGS = $(opt) $(dbg) -std=c89 -fpic -pedantic -Wall -fno-strict-aliasing -I.
+CFLAGS = $(opt) -fpic -I.
+LDFLAGS = $(ldopt) -shared -Wl,-soname,$(soname)
.PHONY: all
all: $(lib_a) $(lib_so)
@@ -16,7 +17,7 @@ $(lib_a): $(obj)
$(AR) rcs $@ $(obj)
$(lib_so): $(obj)
- $(CC) -shared -Wl,-soname,$(soname) -o $@ $(obj)
+ $(CC) $(LDFLAGS) -o $@ $(obj)
%.o: $(srcdir)/%.c
$(CC) $(CFLAGS) -c $< -o $@
diff -Npur libspnav-0.2.2.orig/configure libspnav-0.2.2/configure
--- libspnav-0.2.2.orig/configure 2012-01-31 22:34:01.448356249 +0100
+++ libspnav-0.2.2/configure 2012-01-31 22:34:39.703355615 +0100
@@ -4,6 +4,7 @@ echo 'configuring spacenav library...'
PREFIX=/usr/local
OPT=yes
+LDOPT=yes
DBG=yes
X11=yes
@@ -26,6 +27,11 @@ for arg; do
--disable-opt)
OPT=no;;
+ --enable-ldopt)
+ LDOPT=yes;;
+ --disable-ldopt)
+ LDOPT=no;;
+
--enable-debug)
DBG=yes;;
--disable-debug)
@@ -44,6 +50,8 @@ for arg; do
echo ' --disable-x11: disable X11 communication mode'
echo ' --enable-opt: enable speed optimizations (default)'
echo ' --disable-opt: disable speed optimizations'
+ echo ' --enable-ldopt: enable link optimizations (default)'
+ echo ' --disable-ldopt: disable link optimizations'
echo ' --enable-debug: include debugging symbols (default)'
echo ' --disable-debug: do not include debugging symbols'
echo 'all invalid options are silently ignored'
@@ -54,6 +62,7 @@ done
echo " prefix: $PREFIX"
echo " optimize for speed: $OPT"
+echo " optimize link: $LDOPT"
echo " include debugging symbols: $DBG"
echo " x11 communication method: $X11"
echo ""
@@ -74,7 +83,11 @@ if [ "$DBG" = 'yes' ]; then
fi
if [ "$OPT" = 'yes' ]; then
- echo 'opt = -O3' >>Makefile
+ echo "opt = ${CFLAGS:--O3}" >>Makefile
+fi
+
+if [ "$LDOPT" = 'yes' ]; then
+ echo "ldopt = ${LDFLAGS}" >>Makefile
fi
if [ "$X11" = 'yes' ]; then
@@ -0,0 +1,27 @@
diff -Npur libspnav-0.2.2.orig/Makefile.in libspnav-0.2.2/Makefile.in
--- libspnav-0.2.2.orig/Makefile.in 2012-01-31 22:40:36.619349333 +0100
+++ libspnav-0.2.2/Makefile.in 2012-01-31 22:41:52.554347975 +0100
@@ -11,7 +11,7 @@ CFLAGS = $(opt) -I.
LDFLAGS = $(ldopt) -shared -Wl,-soname,$(soname)
.PHONY: all
-all: $(lib_a) $(lib_so)
+all: $(lib_so)
$(lib_a): $(obj)
$(AR) rcs $@ $(obj)
@@ -31,10 +31,10 @@ distclean:
rm -f $(obj) $(lib_a) $(lib_so) Makefile
.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
+install: $(lib_so)
+ mkdir -p $(DESTDIR)$(PREFIX)/$(libdir) $(DESTDIR)$(PREFIX)/include
+ cp $(lib_so) $(DESTDIR)$(PREFIX)/$(libdir)/$(lib_so)
+ for h in $(hdr); do cp -p $(srcdir)/$$h $(DESTDIR)$(PREFIX)/include/; done
.PHONY: uninstall
uninstall:
+78
View File
@@ -0,0 +1,78 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>libspnav</Name>
<Homepage>http://spacenav.sourceforge.net</Homepage>
<Packager>
<Name>Osman Erkan</Name>
<Email>osman.erkan@pisilinux.org</Email>
</Packager>
<License>BSD</License>
<IsA>library</IsA>
<Summary>Open source alternative to 3DConnextion drivers</Summary>
<Description>The spacenav project provides a free compatible alternative, to the proprietary 3Dconnexion device driver and SDK, for their 6dof space navigation input devices. It provides both a replacement free user-space driver, and a replacement SDK library.</Description>
<Archive sha1sum="c9291ed4acb38da3be4f81e6e3b43f853ce55eca" type="targz">http://sourceforge.net/projects/spacenav/files/spacenav%20library%20%28SDK%29/libspnav%200.2.2/libspnav-0.2.2.tar.gz</Archive>
<BuildDependencies>
<Dependency>libX11-devel</Dependency>
</BuildDependencies>
<Patches>
<Patch level="1">libspnav-0.2.2-custom-flags.patch</Patch>
<Patch level="1">libspnav-0.2.2-makefile.patch</Patch>
</Patches>
</Source>
<Package>
<Name>libspnav</Name>
<RuntimeDependencies>
<Dependency>libX11</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="library">/usr/lib/</Path>
<Path fileType="doc">/usr/share/doc</Path>
</Files>
</Package>
<Package>
<Name>libspnav-devel</Name>
<Summary>Development files for libspnav</Summary>
<RuntimeDependencies>
<Dependency release="current">libspnav</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="header">/usr/include</Path>
<Path fileType="library">/usr/lib/libspnav.so</Path>
</Files>
</Package>
<History>
<Update release="4">
<Date>2014-05-25</Date>
<Version>0.2.2</Version>
<Comment>Rebuild.</Comment>
<Name>Alihan Öztürk</Name>
<Email>alihan@pisilinux.org</Email>
</Update>
<Update release="3">
<Date>2014-03-09</Date>
<Version>0.2.2</Version>
<Comment>Rebuild.</Comment>
<Name>Kamil Atlı</Name>
<Email>suvarice@gmail.com</Email>
</Update>
<Update release="2">
<Date>2013-04-28</Date>
<Version>0.2.2</Version>
<Comment>Fixed</Comment>
<Name>Osman Erkan</Name>
<Email>osman.erkan@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2013-01-01</Date>
<Version>0.2.2</Version>
<Comment>First release</Comment>
<Name>Osman Erkan</Name>
<Email>osman.erkan@pisilinux.org</Email>
</Update>
</History>
</PISI>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>libspnav</Name>
<Summary xml:lang="en">Open source alternative to 3DConnextion drivers</Summary>
<Description xml:lang="en">The spacenav project provides a free compatible alternative, to the proprietary 3Dconnexion device driver and SDK, for their 6dof space navigation input devices. It provides both a replacement free user-space driver, and a replacement SDK library.</Description>
</Source>
<Package>
<Name>libspnav-devel</Name>
<Summary xml:lang="tr">libspnav için geliştirme dosyaları</Summary>
</Package>
</PISI>