|
From: Paul H. <pg...@us...> - 2006-04-18 11:03:32
|
Update of /cvsroot/pptpclient/specs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11776 Modified Files: pptpconfig.spec Log Message: Update to 20060410 Use php4-pcntl instead of php-pcntl (virtual provides issue) Define %__id_u macro in a more portable way Use relative symlinks instead of absolute ones Put xml/xpm files under %{_datadir} instead of /usr/lib Get rid of ver, rel, rpmrel, suse_version, and mandriva_version macros Add build options: --with mandriva (for Mandrake/Mandriva) --with suse (for SuSE) --with newpam (for pam > 0.90 or so) Add %{?dist} tag for distribution identification Add "provides: pptp-php-gtk" to go with the obsoletes Try to preserve file timestamps Index: pptpconfig.spec =================================================================== RCS file: /cvsroot/pptpclient/specs/pptpconfig.spec,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- pptpconfig.spec 14 Mar 2006 12:44:44 -0000 1.11 +++ pptpconfig.spec 18 Apr 2006 11:03:17 -0000 1.12 @@ -1,68 +1,65 @@ +# +# build options: +# --with mandriva (for Mandrake/Mandriva) +# --with suse (for SuSE) +# --with newpam (for pam > 0.90 or so) +# + # Uncomment the following line for beta release versions # (i.e. change hash symbol to percent symbol and specify beta version) #define beta rc1 -%define ver 20060222 -%define rel 1 - -%define rpmrel %{?beta:0.%{beta}.}%{rel} -%define private_suffix -pcntl +%define private_suffix 4-pcntl %define private_php_dir %{_libdir}/php%{private_suffix} +%define datadirrel %(echo %{_datadir} | %{__sed} -e 's,^/,,') %define desktop_vendor PPTP - -# SuSE or Mandriva versions of the package can be built by defining suse_version or mandriva_version -# on the rpmbuild command line, e.g. rpmbuild --define "suse_version 910" -ba pptpconfig.spec -%if %{?mandriva_version:1}%{!?mandriva_version:0} -%define is_mandriva 1 -%else -%define is_mandriva 0 -%endif -%{!?__id_u:%define __id_u /bin/id -u} +%{!?__id_u: %define __id_u %([ -x /bin/id ]&&echo /bin/id||([ -x /usr/bin/id ]&&echo /usr/bin/id||echo /bin/true)) -u} Summary: Point-to-Point Tunneling Protocol (PPTP) Client Configuration GUI Name: pptpconfig -Version: %{ver} -%if %{is_mandriva} -Release: %{rpmrel}mdk -Requires: iproute2 -%else -Release: %{rpmrel}%{?suse_version:suse} -Requires: iproute -%endif +Version: 20060410 +Release: %{?beta:0.%{beta}.}1%{?dist} +Distribution: PPTP Client Project +URL: http://quozl.netrek.org/pptp/pptpconfig/ Source0: http://quozl.netrek.org/pptp/pptpconfig/pptpconfig-%{version}.tar.gz Source1: pptpconfig.png +Source2: pptpconfig.pam Patch1: pptpconfig-desktop.patch Patch2: pptpconfig-desktop-suse.patch License: GPL -%if %{!?suse_version:1}%{?suse_version:0} +%if %{?_with_suse:0}%{!?_with_suse:1} Group: Applications/Internet Requires: usermode >= 1.36 %else Group: Productivity/Networking/PPP Requires: xsu %endif -Distribution: PPTP Client Project -URL: http://quozl.netrek.org/pptp/pptpconfig/ -Requires: ppp >= 2.4.2, pptp >= 1.2.0, php-gtk%{private_suffix}, php%{private_suffix} >= 4.3.9-2 -BuildRequires: desktop-file-utils +Requires: ppp >= 2.4.2, pptp >= 1.2.0, php%{private_suffix}-gtk, php%{private_suffix} >= 4.3.9-2 +Requires: iproute%{?_with_mandriva:2} +BuildRequires: desktop-file-utils, symlinks Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Obsoletes: pptp-php-gtk +Provides: pptp-php-gtk BuildArch: noarch %description -Graphical user interface for PPTP Client. -Supports configuration of tunnels, starting, stopping, catching debug -output from pppd, DNS and routing changes. +Graphical user interface for PPTP Client. Supports configuration of tunnels, +starting, stopping, catching debug output from pppd, DNS and routing changes. %prep %setup -q %patch1 -p0 -%if %{?suse_version:1}%{!?suse_version:0} +%if %{?_with_suse:1}%{!?_with_suse:0} %patch2 -p0 %endif -%{__sed} -i -e 's@/usr/lib/php-pcntl/bin/php@/bin/php%{private_suffix}@' pptpconfig.php +%{__sed} -i -e 's@/usr/lib/php-pcntl/bin/php@/bin/php%{private_suffix}@' \ + -e 's@usr/lib/@%{datadirrel}/@' pptpconfig.php Makefile %{__sed} -i -e 's#@sbindir@#%{_sbindir}#' -e 's#@datadir@#%{_datadir}#' pptpconfig.desktop -%{__cp} %{SOURCE1} . +%{__cp} -p %{SOURCE1} . +%if %{?_with_newpam:1}%{!?_with_newpam:0} +%{__rm} -f pptpconfig.pam +%{__cp} -p %{SOURCE2} . +%endif %install # Some directory names hardcoded here because they are hardcoded in the PHP script @@ -72,13 +69,20 @@ sysconfdir=/etc \ datadir=%{_datadir} \ DESTDIR=%{buildroot} \ - install%{!?suse_version: install-pam} -%{__install} -D -m 0444 pptpconfig.png %{buildroot}/%{_datadir}/pixmaps/pptpconfig.png + INSTALL="%{__install} -p" \ + install%{!?_with_suse: install-pam} +%{__install} -D -m 0444 -p pptpconfig.png %{buildroot}/%{_datadir}/pixmaps/pptpconfig.png /usr/bin/desktop-file-install \ --vendor %{desktop_vendor} \ --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/pptpconfig.desktop +# Fix absolute symlink +%{__rm} -f %{buildroot}%{_sbindir}/pptpconfig +cd %{buildroot}%{_sbindir} +%{__ln_s} %{buildroot}%{_bindir}/pptpconfig.php pptpconfig +/usr/bin/symlinks -cs . +cd - %clean %{__rm} -rf %{buildroot} @@ -95,22 +99,35 @@ %files %defattr(-,root,root) -%dir /etc/pptpconfig -%dir /usr/lib/pptpconfig +%dir /etc/pptpconfig/ %{_bindir}/pptpconfig.php %{_sbindir}/pptpconfig -%if %{!?suse_version:1}%{?suse_version:0} +%if %{!?_with_suse:1}%{?_with_suse:0} %{_bindir}/pptpconfig %config(noreplace) /etc/pam.d/pptpconfig %config(noreplace) /etc/security/console.apps/pptpconfig %endif %{_datadir}/applications/%{desktop_vendor}-pptpconfig.desktop %{_datadir}/pixmaps/pptpconfig.png -/usr/lib/pptpconfig/pptpconfig.xml -/usr/lib/pptpconfig/*.xpm +%{_datadir}/pptpconfig/ %doc AUTHORS COPYING DEVELOPERS NEWS README TODO ChangeLog %changelog +* Thu Apr 13 2006 Paul Howarth <pa...@ci...> 20060410-1 +- update to 20060410 +- use php4-pcntl instead of php-pcntl (virtual provides issue) +- define %%__id_u macro in a more portable way +- use relative symlinks instead of absolute ones +- put xml/xpm files under %%{_datadir} instead of /usr/lib +- get rid of ver, rel, rpmrel, suse_version, and mandriva_version macros +- add build options: + --with mandriva (for Mandrake/Mandriva) + --with suse (for SuSE) + --with newpam (for pam > 0.90 or so) +- add %%{?dist} tag for distribution identification +- add "provides: pptp-php-gtk" to go with the obsoletes +- try to preserve file timestamps + * Tue Mar 14 2006 Paul Howarth <pa...@ci...> 20060222-1 - update to 20060222 |