ivanromanov pushed to jdns (epel7). "USE_RELATIVE_PATHS=OFF (ON produces broken .pc files), .spec cosmetics"
notifications at fedoraproject.org
notifications at fedoraproject.org
Sun May 10 18:31:49 UTC 2015
From b6d25da225671452606f5d7bebe7cfa7c17dbc9f Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter at math.unl.edu>
Date: Fri, 8 May 2015 09:28:33 -0500
Subject: USE_RELATIVE_PATHS=OFF (ON produces broken .pc files), .spec
cosmetics
diff --git a/jdns-2.0.1-relative_paths.patch b/jdns-2.0.1-relative_paths.patch
new file mode 100644
index 0000000..d80d627
--- /dev/null
+++ b/jdns-2.0.1-relative_paths.patch
@@ -0,0 +1,12 @@
+diff -up jdns-2.0.1/CMakeLists.txt.relative_paths jdns-2.0.1/CMakeLists.txt
+--- jdns-2.0.1/CMakeLists.txt.relative_paths 2015-03-15 18:06:41.000000000 -0500
++++ jdns-2.0.1/CMakeLists.txt 2015-05-08 09:08:38.216989662 -0500
+@@ -87,7 +87,7 @@ get_filename_component(LIB_INSTALL_DIR $
+ get_filename_component(INCLUDE_INSTALL_DIR ${INCLUDE_INSTALL_DIR} ABSOLUTE)
+
+ # if all paths are subdirs of CMAKE_INSTALL_PREFIX it is possible to use relative paths
+-set(USE_RELATIVE_PATHS ON)
++set(USE_RELATIVE_PATHS OFF)
+ foreach(PATH ${BIN_INSTALL_DIR} ${LIB_INSTALL_DIR} ${INCLUDE_INSTALL_DIR})
+ string(FIND "${PATH}/" "${CMAKE_INSTALL_PREFIX}/" POS)
+ if(NOT "${POS}" STREQUAL "0")
diff --git a/jdns.spec b/jdns.spec
index 1b43c7a..e925dd0 100644
--- a/jdns.spec
+++ b/jdns.spec
@@ -1,12 +1,16 @@
Name: jdns
Version: 2.0.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A simple DNS queries library
License: MIT
URL: http://delta.affinix.com/jdns/
Source0: http://delta.affinix.com/download/%{name}-%{version}.tar.bz2
+## upstreamable patches
+# USE_RELATIVE_PATHS broken wrt pkgconfig files, so default off
+Patch1: jdns-2.0.1-relative_paths.patch
+
BuildRequires: cmake
BuildRequires: pkgconfig(QtCore) pkgconfig(QtNetwork)
## if/when Qt5 support is added
@@ -60,17 +64,22 @@ developing applications that use qjdns.
%prep
%setup -q
+%patch1 -p1 -b .relative_paths
+
%build
-mkdir -p %{_target_platform}
+mkdir %{_target_platform}
pushd %{_target_platform}
-%{cmake} -DQT4_BUILD=ON ..
+%{cmake} .. \
+ -DQT4_BUILD:BOOL=ON
+
make %{?_smp_mflags}
popd
+
%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
-rm -fv %{buildroot}%{_libdir}/lib*.la
+
%check
export PKG_CONFIG_PATH=%{buildroot}%{_libdir}/pkgconfig
@@ -78,21 +87,14 @@ export PKG_CONFIG_PATH=%{buildroot}%{_libdir}/pkgconfig
test "$(pkg-config --modversion jdns)" = "%{version}"
test "$(pkg-config --modversion qjdns)" = "%{version}"
+
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
-%post -n qjdns -p /sbin/ldconfig
-%postun -n qjdns -p /sbin/ldconfig
-
-
%files
%doc COPYING README.md
%{_libdir}/libjdns.so.2*
-%files -n qjdns
-%{_bindir}/jdns
-%{_libdir}/libqjdns.so.2*
-
%files devel
%dir %{_includedir}/jdns/
%{_includedir}/jdns/jdns.h
@@ -101,6 +103,13 @@ test "$(pkg-config --modversion qjdns)" = "%{version}"
%{_libdir}/cmake/jdns/
%{_libdir}/pkgconfig/jdns.pc
+%post -n qjdns -p /sbin/ldconfig
+%postun -n qjdns -p /sbin/ldconfig
+
+%files -n qjdns
+%{_bindir}/jdns
+%{_libdir}/libqjdns.so.2*
+
%files -n qjdns-devel
%{_includedir}/jdns/qjdns.h
%{_includedir}/jdns/qjdnsshared.h
@@ -108,7 +117,11 @@ test "$(pkg-config --modversion qjdns)" = "%{version}"
%{_libdir}/cmake/qjdns/
%{_libdir}/pkgconfig/qjdns.pc
+
%changelog
+* Fri May 08 2015 Rex Dieter <rdieter at fedoraproject.org> 2.0.1-3
+- USE_RELATIVE_PATHS=OFF (ON produces broken .pc files), .spec cosmetics
+
* Sat May 02 2015 Kalev Lember <kalevlember at gmail.com> - 2.0.1-2
- Rebuilt for GCC 5 C++11 ABI change
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/jdns.git/commit/?h=epel7&id=b6d25da225671452606f5d7bebe7cfa7c17dbc9f
More information about the scm-commits
mailing list