kopia lustrzana https://github.com/FreeSpacenav/libspnav
Added pkgconfig file. Closes github feature request #14
rodzic
6c7621ed42
commit
7bfd4dc94c
|
@ -9,3 +9,4 @@ Makefile
|
|||
examples/cube/cube
|
||||
examples/simple/simple_af_unix
|
||||
examples/simple/simple_x11
|
||||
spnav.pc
|
||||
|
|
|
@ -59,6 +59,8 @@ install: $(lib_a) $(lib_so) $(hdr)
|
|||
ln -s $(soname) $(devlink) || \
|
||||
true
|
||||
for h in $(hdr); do cp -p $(srcdir)/$$h $(DESTDIR)$(PREFIX)/include/; done
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/share/pkgconfig
|
||||
cp spnav.pc $(DESTDIR)$(PREFIX)/share/pkgconfig/spnav.pc
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
|
@ -68,4 +70,5 @@ uninstall:
|
|||
rm -f $(DESTDIR)$(PREFIX)/$(libdir)/$(soname) $(DESTDIR)$(PREFIX)/$(libdir)/$(devlink) || \
|
||||
true
|
||||
for i in $(hdr); do rm -f $(DESTDIR)$(PREFIX)/include/$$i; done
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/pkgconfig/spnav.pc
|
||||
|
||||
|
|
|
@ -6,6 +6,19 @@ PREFIX=/usr/local
|
|||
OPT=yes
|
||||
DBG=yes
|
||||
X11=yes
|
||||
VER=`git describe --tags 2>/dev/null`
|
||||
|
||||
if [ -z "$VER" ]; then
|
||||
VER=`git rev-parse --short HEAD`
|
||||
if [ -z "$VER" ]; then
|
||||
VER=v`pwd | grep 'libspnav-[0-9]\+\.' | sed 's/.*libspnav-\(\([0-9]\+\.\)\+[0-9]\+\).*$/\1/'`
|
||||
if [ $VER = v ]; then
|
||||
VER='<unknown version>'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "configuring libspnav - $VER"
|
||||
|
||||
srcdir="`dirname "$0"`"
|
||||
libdir=lib
|
||||
|
@ -108,6 +121,12 @@ if [ "$X11" = 'yes' ]; then
|
|||
fi
|
||||
echo '#endif /* SPNAV_CONFIG_H_ */' >>spnav_config.h
|
||||
|
||||
# create pkgconfig file
|
||||
echo 'creating spnav.pc ...'
|
||||
pcver=`echo $VER | sed 's/^v//'`
|
||||
echo "PREFIX=$PREFIX" >spnav.pc
|
||||
cat spnav.pc.in | sed "s/@VERSION@/$pcver/; s/@LIBDIR@/$libdir/" >>spnav.pc
|
||||
|
||||
#done
|
||||
echo ''
|
||||
echo 'Done. You can now type make (or gmake) to compile libspnav.'
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
Name: libspnav
|
||||
Description: Library to access 6-DoF input devices managed by spacenavd or the proprietary 3dxsrv driver.
|
||||
URL: http://spacenav.sourceforge.net
|
||||
Version: @VERSION@
|
||||
Cflags: -I${PREFIX}/include
|
||||
Libs: -L${PREFIX}/@LIBDIR@ -lspnav
|
Ładowanie…
Reference in New Issue