Update to 0.4.0 Switch to cmake

This commit is contained in:
Nicolas Chauvet 2010-03-24 23:39:12 +00:00
parent 8ac700fbee
commit 95da386207
7 changed files with 65 additions and 58 deletions

View File

@ -1 +1 @@
libproxy-0.3.1.tar.bz2
libproxy-0.4.0.tar.gz

View File

@ -1,2 +1,3 @@
libproxy-0_2_3-8_fc10:HEAD:libproxy-0.2.3-8.fc10.src.rpm:1232723319
libproxy-0_3_0-1_fc12:HEAD:libproxy-0.3.0-1.fc12.src.rpm:1255986871
libproxy-0_4_0-1_fc12:HEAD:libproxy-0.4.0-1.fc12.src.rpm:1269473814

View File

@ -1,32 +0,0 @@
diff -up libproxy-0.3.1/configure.ac.kde4 libproxy-0.3.1/configure.ac
--- libproxy-0.3.1/configure.ac.kde4 2009-10-05 20:42:34.000000000 +0200
+++ libproxy-0.3.1/configure.ac 2010-02-22 00:12:30.690720150 +0100
@@ -23,8 +23,6 @@ AC_CHECK_FUNCS(pthread_mutex_init)
AC_SEARCH_LIBS([socket],[socket inet])
AC_SEARCH_LIBS([dlopen],[dl])
-AC_CHECK_LIB([kdecore], [main], have_kdecore=yes, have_kdecore=no)
-
### Checks for module dependencies.
AC_PATH_PROG(GCONFTOOLBIN, gconftool-2)
PKG_CHECK_MODULES(x11, x11, have_x11=yes, have_x11=no)
@@ -38,6 +36,8 @@ PKG_CHECK_MODULES(NetworkManager, Networ
have_networkmanager=yes, have_networkmanager=no)
PKG_CHECK_MODULES(QtCore, QtCore, have_qtcore=yes, have_qtcore=no)
+AC_CHECK_LIB([kdecore], [main], have_kdecore=yes, have_kdecore=yes)
+
# Direct
AC_ARG_WITH([direct],
[AS_HELP_STRING([--with-direct],
@@ -96,8 +96,8 @@ AC_ARG_WITH([kde4],
if test x$with_kde4 = xyes; then
if test x$have_qtcore = xyes && \
test x$have_kdecore = xyes; then
- KDE4_CFLAGS="$QtCore_CFLAGS"
- KDE4_LIBS="$QtCore_LIBS -lkdecore"
+ KDE4_CFLAGS="$KDE4_CFLAGS $QtCore_CFLAGS"
+ KDE4_LIBS="$KDE4_LIBS -lkdecore $QtCore_LIBS"
AC_SUBST(KDE4_CFLAGS)
AC_SUBST(KDE4_LIBS)
else

View File

@ -0,0 +1,12 @@
diff -up libproxy-0.4.0/libproxy/CMakeLists.txt.ldflags libproxy-0.4.0/libproxy/CMakeLists.txt
--- libproxy-0.4.0/libproxy/CMakeLists.txt.ldflags 2010-02-25 21:29:54.000000000 +0100
+++ libproxy-0.4.0/libproxy/CMakeLists.txt 2010-03-14 16:08:52.147990318 +0100
@@ -58,7 +58,7 @@ if("${PKG_CONFIG_FOUND}")
endif()
endif()
if(X11_FOUND)
- px_check_modules(GNOME gconf-2.0)
+ px_check_modules(GNOME gconf-2.0 gobject-2.0)
find_package(KDE4)
find_package(Qt4)
if(KDE4_FOUND AND QT4_FOUND)

View File

@ -0,0 +1,12 @@
diff -up libproxy-0.4.0/bindings/CMakeLists.txt.pyarch libproxy-0.4.0/bindings/CMakeLists.txt
--- libproxy-0.4.0/bindings/CMakeLists.txt.pyarch 2010-02-25 21:29:54.000000000 +0100
+++ libproxy-0.4.0/bindings/CMakeLists.txt 2010-03-14 21:03:16.059831098 +0100
@@ -3,7 +3,7 @@ find_package(PythonInterp)
if(PYTHONINTERP_FOUND)
execute_process(COMMAND
${PYTHON_EXECUTABLE}
- -c "import distutils.sysconfig ; print distutils.sysconfig.get_python_lib(plat_specific=1)"
+ -c "import distutils.sysconfig ; print distutils.sysconfig.get_python_lib()"
OUTPUT_VARIABLE pysitepkgdir
OUTPUT_STRIP_TRAILING_WHITESPACE)
install(FILES libproxy.py DESTINATION ${pysitepkgdir})

View File

@ -3,19 +3,20 @@
%global gecko_version 1.9.2
Name: libproxy
Version: 0.3.1
Release: 4%{?dist}
Version: 0.4.0
Release: 1%{?dist}
Summary: A library handling all the details of proxy configuration
Group: System Environment/Libraries
License: LGPLv2+
URL: http://code.google.com/p/libproxy/
Source0: http://libproxy.googlecode.com/files/libproxy-%{version}.tar.bz2
Patch0: libproxy-0.3.1-kde4.patch
Source0: http://libproxy.googlecode.com/files/libproxy-%{version}.tar.gz
Patch0: libproxy-0.4-ldflags.patch
Patch1: libproxy-0.4.0-pyarch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python-devel
BuildRequires: libtool
BuildRequires: cmake >= 2.8.0
# gnome
BuildRequires: GConf2-devel
@ -117,19 +118,17 @@ developing applications that use %{name}.
%prep
%setup -q
%patch0 -p1 -b .kde4
#To avoid rpath on _libdir
autoreconf -vif
%patch0 -p1 -b .ldflags
%patch1 -p1 -b .pyarch
sed -i -e 's|-Werror||' CMakeLists.txt
%build
#needed to find kde4 libs
KDE4_LIBS=" -L%{_libdir}/kde4/devel"
KDE4_CFLAGS=" -I%{_includedir}/kde4"
export KDE4_LIBS
export KDE4_CFLAGS
%configure --includedir=%{_includedir}/libproxy --disable-static --with-python
make %{?_smp_mflags}
%{cmake} \
-Dmoduledir=%{_libdir}/%{name}/%{version}/modules \
.
make VERBOSE=1 %{?_smp_mflags}
%install
@ -137,6 +136,25 @@ rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
#Manual install for modules
mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}/modules
install -pm 0755 lib/libproxy.so $RPM_BUILD_ROOT%{_libdir}/libproxy.so.1.0.0
ln -s libproxy.so.1.0.0 $RPM_BUILD_ROOT%{_libdir}/libproxy.so.1
ln -s libproxy.so.1.0.0 $RPM_BUILD_ROOT%{_libdir}/libproxy.so
for f in lib/*_*.so ; do
install -pm 0755 ${f} \
$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}/modules
done
mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig
sed -e's|@prefix@|%{_prefix}|g' \
-e's|@libdir@|%{_libdir}|g' \
-e's|@includedir@|%{_includedir}|g' \
-e's|@VERSION@|%{version}|g' \
< libproxy/libproxy-1.0.pc.in \
> $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libproxy-1.0.pc
%clean
rm -rf $RPM_BUILD_ROOT
@ -154,14 +172,6 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/%{version}
%dir %{_libdir}/%{name}/%{version}/modules
%{_libdir}/%{name}/%{version}/modules/config_direct.so
%{_libdir}/%{name}/%{version}/modules/config_envvar.so
%{_libdir}/%{name}/%{version}/modules/config_file.so
%{_libdir}/%{name}/%{version}/modules/config_wpad.so
%{_libdir}/%{name}/%{version}/modules/ignore_ip.so
%{_libdir}/%{name}/%{version}/modules/ignore_domain.so
%{_libdir}/%{name}/%{version}/modules/wpad_dnsdevolution.so
%{_libdir}/%{name}/%{version}/modules/wpad_dns.so
%files bin
%defattr(-,root,root,-)
@ -193,12 +203,16 @@ rm -rf $RPM_BUILD_ROOT
%files devel
%defattr(-,root,root,-)
%{_includedir}/libproxy/
%{_includedir}/proxy.h
%{_libdir}/*.so
%{_libdir}/pkgconfig/libproxy-1.0.pc
%changelog
* Wed Mar 24 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 0.4.0-1
- Update to 0.4.0
- Switch to cmake
* Thu Mar 11 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 0.3.1-4
- Add missing libXmu-devel

View File

@ -1 +1 @@
1745fe1bdf5beca1bf7269758f3906e8 libproxy-0.3.1.tar.bz2
b22c95df70a40949e99add5171fc3084 libproxy-0.4.0.tar.gz