1 %include /usr/lib/rpm/macros.perl
2 Summary: Open source content management system (CMS)
7 Group: Development/Languages/Perl
8 URL: http://www.plainblack.com/webgui
9 Source0: http://files.plainblack.com/downloads/5.x.x/webgui-%{version}.tar.gz
10 BuildRequires: perl >= 5.6
11 BuildRequires: rpm-perlprov >= 3.0.3-16
13 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16 WebGUI is a content management platform built to allow average
17 business users to build and maintain complex web sites. It is modular,
18 pluggable, and platform independent. It was designed to allow the
19 people who create the content, to manage it online, rather than
20 content management taking up the time of the busy IT Staff.
25 %{__perl} -pi -e 's|/data/WebGUI|%{_libdir}/WebGUI|' sbin/preload.perl etc/WebGUI.conf*
26 %{__perl} -pi -e 's|configFile\s+=\s+\"WebGUI.conf\"|configFile = \"%{_sysconfdir}/WebGUI/WebGUI.conf\"|' www/index.pl
27 %{__perl} -pi -e 's|webguiRoot\s*=\s*\".+?\"|webguiRoot = \"%{_libdir}/WebGUI\"|' www/index.pl
28 %{__perl} -pi -e "s|(\\\$session\{config\}\{webguiRoot\}\.'/etc/')|'/etc/'|g;" \
34 rm -rf $RPM_BUILD_ROOT
35 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/sql
36 install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
39 mv docs/upgrades $RPM_BUILD_ROOT%{_libdir}/%{name}/sql
40 mv docs/create.sql $RPM_BUILD_ROOT%{_libdir}/%{name}/sql
42 mv etc/* $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
44 cp -av . $RPM_BUILD_ROOT%{_libdir}/%{name}
45 rm -r $RPM_BUILD_ROOT%{_libdir}/%{name}/docs
48 rm -rf $RPM_BUILD_ROOT
51 %defattr(644,root,root,755)
53 %{_sysconfdir}/%{name}