]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
add pkgconfig support
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Thu, 17 Sep 2009 12:54:03 +0000 (14:54 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 17 Sep 2009 13:18:31 +0000 (15:18 +0200)
.gitignore
Makefile.in
configure.ac
libnewt.pc.in [new file with mode: 0644]
newt.spec

index 2555f0f5405b0cdb35ce46c9acbb345c6dd9899c..a6edee8342bd63bd2006d4940185eb91933a11f9 100644 (file)
@@ -10,7 +10,9 @@ po/*.mo
 test
 testgrid
 whiptail
-libnewt*
+libnewt.a
+libnewt.pc
+libnewt.so*
 snack.pyc
 shared
 testtree
index 2d238f9aa192b8de759f35b57e5b5dbbc1a1b0f9..ef6bdd4615d7fa3eca152287dfe6345559b4e83e 100644 (file)
@@ -35,6 +35,7 @@ bindir = @bindir@
 datadir = @datadir@
 mandir = @mandir@
 man1dir = $(mandir)/man1
+pkgconfigdir = $(libdir)/pkgconfig
 
 #--------------------------------------
 
@@ -90,7 +91,7 @@ veryclean: clean
 
 clean:
        rm -f $(PROGS) *.o $(LIBNEWT) core $(LIBNEWTSH)  \
-               $(SHAREDDIR)/*.o *.so*
+               $(SHAREDDIR)/*.o *.so* *.pc
 
 depend:
        $(CPP) $(CFLAGS) $(CPPFLAGS) -M $(SOURCES) > .depend
@@ -118,6 +119,7 @@ install: $(LIBNEWT) install-sh whiptail
        install -m 755 whiptail $(instroot)/$(bindir)
        install -m 644 whiptail.1 $(instroot)/$(man1dir)
        make -C po datadir=$(instroot)/$(datadir) install
+       install -m 644 -D libnewt.pc $(instroot)/$(pkgconfigdir)/libnewt.pc
 
 install-sh: sharedlib $(WHIPTCLSO) _snackmodule.so
        [ -d $(instroot)/$(libdir) ] || install -m 755 -d $(instroot)/$(libdir)
index 42a667a0d4d1c2f2bdbb844313956d2366e45571..f1e56c86ddacb19d4c4b31fb0a7ad7097015b453 100644 (file)
@@ -41,6 +41,6 @@ if test "x$enable_nls" != "xno"; then
   AC_DEFINE([ENABLE_NLS], 1, [Define to 1 if NLS support is enabled])
 fi
 
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile libnewt.pc])
 AC_OUTPUT
 
diff --git a/libnewt.pc.in b/libnewt.pc.in
new file mode 100644 (file)
index 0000000..89dc934
--- /dev/null
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libnewt
+Description: A development library for text mode user interfaces
+Version: @VERSION@
+Libs: -L${libdir} -lnewt
+Cflags: -I${includedir}
index 8220b502c19f97ae8ca846f47bd5be224fe145c1..35a0f127444ff2e2bafcba783a452849c2631bf7 100644 (file)
--- a/newt.spec
+++ b/newt.spec
@@ -89,6 +89,7 @@ rm -rf $RPM_BUILD_ROOT
 %doc tutorial.sgml
 %{_includedir}/newt.h
 %{_libdir}/libnewt.so
+%{_libdir}/pkgconfig/libnewt.pc
 
 %files static
 %defattr(-,root,root)