From d6adad085bf195bd55e7c2dc247c72974e6fa4ff Mon Sep 17 00:00:00 2001 From: Ville-Pekka Vainio Date: May 26 2008 18:46:59 +0000 Subject: Add pkgconfig patch --- diff --git a/libvoikko-add-pkgconfig.patch b/libvoikko-add-pkgconfig.patch new file mode 100644 index 0000000..53f1633 --- /dev/null +++ b/libvoikko-add-pkgconfig.patch @@ -0,0 +1,38 @@ +Index: configure.ac +=================================================================== +--- configure.ac (revision 2171) ++++ configure.ac (working copy) +@@ -103,5 +103,5 @@ + dnl Default compiler settings + CFLAGS="$CFLAGS -Wall -Werror -pedantic -std=c99 -D_POSIX_C_SOURCE=200112L" + +-AC_CONFIG_FILES([Makefile src/Makefile]) ++AC_CONFIG_FILES([Makefile src/Makefile src/libvoikko.pc]) + AC_OUTPUT +Index: src/libvoikko.pc.in +=================================================================== +--- src/libvoikko.pc.in (revision 0) ++++ src/libvoikko.pc.in (revision 0) +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: libvoikko ++Description: Library for spellcheckers and hyphenators ++Version: @VERSION@ ++Libs: -L${libdir} -lvoikko ++Libs.private: -lmalaga ++Cflags: -I${includedir} +Index: src/Makefile.am +=================================================================== +--- src/Makefile.am (revision 2171) ++++ src/Makefile.am (working copy) +@@ -17,3 +17,6 @@ + + dist_man_MANS = voikkospell.1 voikkohyphenate.1 + ++pkgconfigdir = $(libdir)/pkgconfig ++pkgconfig_DATA = libvoikko.pc ++ diff --git a/libvoikko.spec b/libvoikko.spec index 96e4b68..ee06471 100644 --- a/libvoikko.spec +++ b/libvoikko.spec @@ -1,6 +1,6 @@ Name: libvoikko Version: 1.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Voikko is a library for spellcheckers and hyphenators Group: System Environment/Libraries @@ -9,9 +9,15 @@ URL: http://voikko.sourceforge.net/ Source0: http://downloads.sourceforge.net/voikko/%{name}-%{version}.tar.gz # Commented out the usual format of test release URLs #Source0: http://www.puimula.org/htp/testing/%{name}-%{version}rc2.tar.gz +# This patch adds a libvoikko.pc file for use with pkg-config. The patch has +# been committed to upstream SVN. +Patch0: libvoikko-add-pkgconfig.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: malaga-devel >= 7.8 +# These are temporarily needed for autoreconf and the AM_ICONV macro as long as +# the pkgconfig patch is used. +BuildRequires: gettext-devel autoconf Requires: malaga-suomi-voikko >= 0.7.3 %description @@ -47,6 +53,10 @@ scripts. %prep %setup -q +%patch0 -p0 +# configure.ac and src/Makefile.am have been patched, so this is needed for +# the patches to actually have an effect. +autoreconf %build @@ -88,8 +98,12 @@ rm -rf $RPM_BUILD_ROOT %doc %{_includedir}/* %{_libdir}/*.so +%{_libdir}/pkgconfig/libvoikko.pc %changelog +* Mon May 26 2008 Ville-Pekka Vainio - 1.7-2 +- Add patch which makes a libvoikko.pc file for pkg-config + * Sat May 24 2008 Ville-Pekka Vainio - 1.7-1 - libvoikko 1.7