From: Thomas Jarosch Date: Thu, 17 Sep 2009 12:54:03 +0000 (+0200) Subject: add pkgconfig support X-Git-Tag: r0-52-11~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aa4c11f39c2e8e19104d454b877949dc4a89bb06;p=thirdparty%2Fnewt.git add pkgconfig support --- diff --git a/.gitignore b/.gitignore index 2555f0f..a6edee8 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,9 @@ po/*.mo test testgrid whiptail -libnewt* +libnewt.a +libnewt.pc +libnewt.so* snack.pyc shared testtree diff --git a/Makefile.in b/Makefile.in index 2d238f9..ef6bdd4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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) diff --git a/configure.ac b/configure.ac index 42a667a..f1e56c8 100644 --- a/configure.ac +++ b/configure.ac @@ -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 index 0000000..89dc934 --- /dev/null +++ b/libnewt.pc.in @@ -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} diff --git a/newt.spec b/newt.spec index 8220b50..35a0f12 100644 --- 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)