diff --git a/atheme-pkgconfig.diff b/atheme-pkgconfig.diff new file mode 100644 index 0000000..e77efe6 --- /dev/null +++ b/atheme-pkgconfig.diff @@ -0,0 +1,47 @@ +parent 418376c88519e3585e1b2c34fba133b7cc015985 (atheme-services-7.0.0-alpha7-627-g418376c) +commit 0c5c860727019adc6ddb2e8b6f29268e51377cb3 +Author: Jan Engelhardt +Date: Wed Jun 6 21:43:09 2012 +0200 + +build: avoid undefined variables in .pc file + +Here is an odd thing. If an undeclared variable is used, `pkg-config +--print-provides foo.pc` will not show anything. The default value +for MODDIR is "${libdir}/atheme/modules", but atheme-services.pc +uses the non-standard "lib_dir". + +So, just use the standard names (without underscore) like everybody +else, to make dependency discovery with pkgconfig working again. +--- + atheme-services.pc.in | 12 ++++++------ + 1 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/atheme-services.pc.in b/atheme-services.pc.in +index 97b21ad..84e52c8 100644 +--- a/atheme-services.pc.in ++++ b/atheme-services.pc.in +@@ -1,16 +1,16 @@ + prefix=@prefix@ + exec_prefix=@exec_prefix@ + datarootdir=@datarootdir@ +-data_dir=@datadir@/@PACKAGE_NAME@ ++datadir=@datadir@/@PACKAGE_NAME@ ++ + MODDIR=@MODDIR@/modules +- + version=@PACKAGE_VERSION@ +-include_dir=@includedir@/@PACKAGE_NAME@ +-lib_dir=@libdir@ ++includedir=@includedir@/@PACKAGE_NAME@ ++libdir=@libdir@ + + Name: atheme-services + Description: Atheme IRC services (for building modules) + Version: @PACKAGE_VERSION@ +-Libs: -L${lib_dir} -lathemecore +-Cflags: -I${include_dir} ++Libs: -L${libdir} -lathemecore ++Cflags: -I${includedir} + +-- +# Created with git-export-patch diff --git a/atheme-pkgconfig2.diff b/atheme-pkgconfig2.diff new file mode 100644 index 0000000..4e534d5 --- /dev/null +++ b/atheme-pkgconfig2.diff @@ -0,0 +1,32 @@ +parent 0c5c860727019adc6ddb2e8b6f29268e51377cb3 (atheme-services-7.0.0-alpha7-628-g0c5c860) +commit abfcdb30b6f537ccf7f525797fb90e5957edd254 +Author: Jan Engelhardt +Date: Wed Jun 6 22:41:00 2012 +0200 + +build: respect evaluation order in .pc file + +Same as before with unresolved variable. + +Signed-off-by: Jan Engelhardt +--- + atheme-services.pc.in | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/atheme-services.pc.in b/atheme-services.pc.in +index 84e52c8..da8d294 100644 +--- a/atheme-services.pc.in ++++ b/atheme-services.pc.in +@@ -3,10 +3,10 @@ exec_prefix=@exec_prefix@ + datarootdir=@datarootdir@ + datadir=@datadir@/@PACKAGE_NAME@ + +-MODDIR=@MODDIR@/modules + version=@PACKAGE_VERSION@ + includedir=@includedir@/@PACKAGE_NAME@ + libdir=@libdir@ ++MODDIR=@MODDIR@/modules + + Name: atheme-services + Description: Atheme IRC services (for building modules) +-- +# Created with git-export-patch diff --git a/atheme.spec b/atheme.spec index 7c3ddd5..dd26829 100644 --- a/atheme.spec +++ b/atheme.spec @@ -32,8 +32,11 @@ Source: %name-services-%version.tar.xz Source1: atheme.init Patch1: atheme-lockmodes.diff Patch2: atheme-config.diff +Patch3: atheme-pkgconfig.diff +Patch4: atheme-pkgconfig2.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cracklib-devel +BuildRequires: fdupes BuildRequires: libopenssl-devel BuildRequires: openldap2-devel BuildRequires: pkgconfig @@ -73,7 +76,7 @@ in %lname. %prep %setup -qn %name-services-%version -%patch -P 1 -P 2 -p1 +%patch -P 1 -P 2 -P 3 -P 4 -p1 # use system libmowgli rm -Rf libmowgli*; @@ -111,6 +114,7 @@ ln -sf "%_sysconfdir/init.d/%name" "$b/%_sbindir/rc%name"; cp -v "$b/%_sysconfdir/%name"/atheme.conf{.example,} cp -v "$b/%_sysconfdir/%name"/atheme.motd{.example,} %find_lang %name +%fdupes %buildroot %pre /usr/bin/getent group atheme >/dev/null 2>/dev/null || \ @@ -129,6 +133,10 @@ cp -v "$b/%_sysconfdir/%name"/atheme.motd{.example,} %restart_on_update %name %insserv_cleanup +%post -n %lname -p /sbin/ldconfig + +%postun -n %lname -p /sbin/ldconfig + %files -f %name.lang %defattr(-,root,root) %_sysconfdir/init.d/%name