[freeside-commits] freeside/install/rpm freeside-mason.deps.inc, 1.1.2.2, NONE freeside.spec, 1.1.4.18, 1.1.4.19
Richard Siddall
rsiddall at wavetail.420.am
Thu Dec 13 19:23:55 PST 2007
Update of /home/cvs/cvsroot/freeside/install/rpm
In directory wavetail:/tmp/cvs-serv834
Modified Files:
Tag: FREESIDE_1_7_BRANCH
freeside.spec
Removed Files:
Tag: FREESIDE_1_7_BRANCH
freeside-mason.deps.inc
Log Message:
Ugly hack to extend rpmbuild's auto-requires to process handler.pl. This is loosely based on notes on the Fedora wiki. The internal dependency generator is disabled and as far as possible the same code is used to generate provides and requires. The list of files to be scanned for requires is saved by a supplemental script and if it contains handler.pl, that file is scanned for requires with the standard Perl dependencies checker. References to RT are filtered out as RT is not enabled in this version of the .spec file. This mod obsoletes the freeside-mason-deps.inc file and simplifies building the RPMs.
Index: freeside.spec
===================================================================
RCS file: /home/cvs/cvsroot/freeside/install/rpm/Attic/freeside.spec,v
retrieving revision 1.1.4.18
retrieving revision 1.1.4.19
diff -u -d -r1.1.4.18 -r1.1.4.19
--- freeside.spec 13 Dec 2007 20:08:37 -0000 1.1.4.18
+++ freeside.spec 14 Dec 2007 03:23:52 -0000 1.1.4.19
@@ -45,7 +45,6 @@
Prefix: /var/www/freeside
Requires: mod_ssl
Requires: perl-Apache-DBI
-%%include freeside-mason.deps.inc
Conflicts: %{name}-apacheasp
Provides: %{name}-frontend
BuildArch: noarch
@@ -98,6 +97,21 @@
perl -pi -e 's|/usr/local/bin|%{buildroot}%{_bindir}|g' FS/Makefile.PL
perl -ni -e 'print if !/\s+chown\s+/;' Makefile
+# Override find-requires/find-provides to supplement Perl requires for HTML::Mason file handler.pl
+cat << \EOF > %{name}-req
+#!/bin/sh
+tee %{_tmppath}/filelist | %{_rpmlibdir}/rpmdeps --requires | sort -u
+grep handler.pl %{_tmppath}/filelist | xargs %{_rpmlibdir}/perldeps.pl --requires \
+| grep -v -E '^perl\((lib|strict|vars|RT)\)$' \
+| grep -v -E '^perl\(RT::' \
+| sort -u
+EOF
+
+%define __find_provides %{_rpmlibdir}/rpmdeps --provides
+%define __find_requires %{_builddir}/%{name}-%{version}/%{name}-req
+%{__chmod} +x %{__find_requires}
+%define _use_internal_dependency_generator 0
+
%build
# Add freeside user and group if there isn't already such a user
@@ -182,8 +196,9 @@
done
# Make a list of the Mason files before adding self-service, etc.
+echo "%attr(-,freeside,freeside) %{freeside_conf}/handler.pl" > %{name}-%{version}-%{release}-mason-filelist
find $RPM_BUILD_ROOT%{freeside_document_root} -type f -print | \
- sed "s@^$RPM_BUILD_ROOT@@g" > %{name}-%{version}-%{release}-mason-filelist
+ sed "s@^$RPM_BUILD_ROOT@@g" >> %{name}-%{version}-%{release}-mason-filelist
if [ "$(cat %{name}-%{version}-%{release}-mason-filelist)X" = "X" ] ; then
echo "ERROR: EMPTY FILE LIST"
exit 1
@@ -305,7 +320,6 @@
%files mason -f %{name}-%{version}-%{release}-mason-filelist
%defattr(-, freeside, freeside, 0755)
-%attr(-,freeside,freeside) %{freeside_conf}/handler.pl
%attr(-,freeside,freeside) %{freeside_cache}/masondata
%attr(0644,root,root) %config(noreplace) %{apache_confdir}/%{name}-base%{apache_version}.conf
--- freeside-mason.deps.inc DELETED ---
More information about the freeside-commits
mailing list