#
# spec file for package libproxy
#
# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
%define owner wangke
# bugdb: http://code.google.com/p/libproxy/issues/detail?id=
#
%define OSR 10998:0.x
%if %opt_arch64
%define _demodir %{_prefix}/demo/jds/bin/%{_arch64}
%else
%define _demodir %{_prefix}/demo/jds/bin
%endif
Name: libproxy
License: LGPL v2.1
Group: System/Libraries/GNOME
Version: 0.4.7
Release: 1
URL: http://code.google.com/p/libproxy/
Distribution: Java Desktop System
Vendor: Google Code
Summary: Libproxy is a library that provides automatic proxy configuration management
Source: http://libproxy.googlecode.com/files/libproxy-%{version}.tar.gz
#owner:wangke date:2009-09-11 type:branding
Patch1: libproxy-01-build.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%package devel
Summary: %{summary} - development files
Requires: %{name} = %{version}
%prep
%setup -q -n %{name}-%{version}
%patch1 -p1
%build
export CFLAGS="%optflags"
export CXXFLAGS="%cxx_optflags"
%if %build_module_mozjs
export LDFLAGS="%{_ldflags} -lCstd -lCrun -lsocket -lnsl -L/usr/lib/firefox -lxpcom"
%else
export LDFLAGS="%{_ldflags} -lCstd -lCrun -lsocket -lnsl"
%endif
export MOZJS_CFLAGS="%optflags"
export MOZJS_LIBS="%{_ldflags}"
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DBIN_INSTALL_DIR=%{_bindir} \
-DLIB_INSTALL_DIR=%{_libdir} \
-DLIBEXEC_INSTALL_DIR=%{_libexecdir} \
-DINCLUDE_INSTALL_DIR=%{_includedir}/libproxy \
-DSYSCONF_INSTALL_DIR=%{_sysconfdir} \
-DWITH_KDE4=no \
-DWITH_WEBKIT=no \
-DWITH_DOTNET=no \
-DWITH_PERL=no \
%if %build_module_gnome
-DWITH_GNOME=yes \
-DWITH_MOZJS=no \
-DWITH_PYTHON=no
%else
%if %build_module_mozjs
-DWITH_GNOME=no \
-DWITH_MOZJS=yes \
-DWITH_PYTHON=no
%else
-DWITH_GNOME=no \
-DWITH_MOZJS=no \
-DWITH_PYTHON=yes
%endif
%endif
make \
pyexecdir=%{_libdir}/python%{pythonver}/vendor-packages \
pythondir=%{_libdir}/python%{pythonver}/vendor-packages
%install
cd build
make install DESTDIR=$RPM_BUILD_ROOT \
pyexecdir=%{_libdir}/python%{pythonver}/vendor-packages \
pythondir=%{_libdir}/python%{pythonver}/vendor-packages
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';'
%if %build_module_gnome
%else
%if %build_module_mozjs
%else
install -d $RPM_BUILD_ROOT%{_demodir}
mv $RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{_demodir}
%endif
%endif
rm -r $RPM_BUILD_ROOT%{_bindir}
%clean
rm -rf $RPM_BUILD_ROOT
%changelog
* Wed Jun 13 2012 - brian.cameron@oracle.com
- Bump to 0.4.7.
* Thu Dec 17 2009 - ke.wang@sun.com
- Separated into three packages: SUNWlibproxy, SUNWlibproxy-gnome
and SUNWlibproxy-mozjs
* Fri Oct 16 2009 - ke.wang@sun.com
- Bump to 0.3.1
* Fri Sep 11 2009 - ke.wang@sun.com
- Bump to 0.3.0
- Remove patch libproxy-01-orig-build.diff
- Remove patch libproxy-02-wpad-fallback.diff
- Remove patch libproxy-03-proxy-readline.diff
- Remove patch libproxy-05-config-posix.diff
- Add patch libproxy-01-build.diff
* Wed Mar 11 2009 - ke.wang@sun.com
- Mended bugdb
- Remove patch4 because the problem is fixed in Python26
* Tue Mar 10 2009 - ke.wang@sun.com
- Add patch5 to replace _GUN_SOURCE with _POSIX_C_SOURCE
* Mon Feb 23 2009 - ke.wang@sun.com
- make wpad-fallback be built by default, but not be check against
user can use PX_CONFIG_ORDER to enable it
* Mon Feb 16 2009 - ke.wang@sun.com
- Add patch libproxy-04-py-find-lib.diff for python binding
* Fri Feb 13 2009 - takao.fujiwara@sun.com
- Add patch proxy-readline.diff to work proxy demo correctly.
* Mon Feb 2, 2009 - ke.wang@sun.com
- Initial spec.