source: ProjectBuilder/projects/linuxcoe/pbconf/cvs/linuxcoe-sd-base/rpm/linuxcoe-sd-base.spec@ 384

Last change on this file since 384 was 384, checked in by Bruno Cornec, 16 years ago

Adds all pb projects under the projects dir (from svn+ssh://svn.project-builder.org/mondo/svn/project-builder)

File size: 2.9 KB
Line 
1Summary: LinuxCOE SystemDesigner web interface
2Name: PBPKG
3Version: PBVER
4Release: PBTAGPBSUF
5License: GPL
6URL: http://linuxcoe.sourceforge.net/
7Group: PBGRP
8# Copyright: 2000-2007 Hewlett-Packard Development Company, L.P
9# Original Packager: Louis Bouchard <louis.bouchard@hp.com>
10#
11# Source Section
12#
13Source: PBSRC
14
15BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
16BuildArch: noarch
17Requires: perl, sudo, PBDEP
18
19%description
20LinuxCOE SystemDesigner is a unifying web application that allows
21a user to repeatably install, configure, and maintain different
22Linux system installations. It's CGI-based interface provides means
23to generate boot images for network or local media based installations,
24save profiles that store custom installation preferences for later re-use,
25and retrofit already deployed systems by overlaying other value-add components.
26
27
28%prep
29%setup -q
30
31%build
32# For the moment done here. Would be better to give it to pb. Needs discussion
33export httpdcfgdir=PBHTTPDCONF
34export docrootdir=PBHTTPDDOCROOT
35export httpd_user=PBHTTPDUSER
36export httpd_group=PBHTTPDGROUP
37export sudoers_cfg=PBSUDOERS
38export webalias=PBWEBALIAS
39export webworkdir=PBWEBWORKDIR
40
41# macro configure doesn't work. (Do not put a percent before the word)
42./configure --prefix=PBROOTINSTALL --sysconfdir=PBETCINSTALL --localstatedir=%{_var} --mandir=%{_mandir} --without-APACHECTL --without-SUDO --without-PERLMOD --without-MKISOFS --without-SENDMAIL
43make
44
45%install
46%{__rm} -rf %{buildroot}
47make DESTDIR="$RPM_BUILD_ROOT" install
48mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d
49export VARLOG=%{_var}/log
50cat > $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/LinuxCOE << EOF
51$VARLOG/* {
52 create 640 PBHTTPDUSER PBHTTPDGROUP
53 rotate 4
54 monthly
55 missingok
56 compress
57 prerotate
58 /etc/init.d/httpd closelogs > /dev/null 2>&1
59 endscript
60 postrotate
61 /etc/init.d/httpd closelogs > /dev/null 2>&1
62 endscript
63}
64EOF
65
66%post
67#
68# Invoke post action script
69#
70PBROOTINSTALL/bin/post-actions -i -v
71/etc/init.d/httpd reload
72if [ -x /usr/sbin/selinuxenabled ]; then
73 /usr/sbin/selinuxenabled
74 if [ $? -eq 0 ]; then
75 echo "WARNING: desactivating SELinux as it is not yet compatible with"
76 echo "LinuxCOE systemDesigner. You'll have to reboot to take it in account"
77 perl -pi -e 's/SELINUX=.*/SELINUX=disabled/' /etc/sysconfig/selinux
78 fi
79fi
80
81# THis is not clear at the moment when doing -U updates
82# this tend to be called after the %post above thus
83# defeating that task :-(
84#%preun
85#if [ -x PBROOTINSTALL/bin/post-actions ]; then
86 #PBROOTINSTALL/bin/post-actions -u -v
87#fi
88#perl -pi -e 's/^PBHTTPDUSER.*//' /etc/sudoers
89#/etc/init.d/httpd reload
90
91%clean
92%{__rm} -rf $RPM_BUILD_ROOT
93
94%files
95%defattr(-,root,root)
96%config(noreplace) PBETCINSTALL
97%config %{_sysconfdir}/logrotate.d/LinuxCOE
98%doc AUTHORS ChangeLog COPYING INSTALL NEWS README
99%{_var}/cache/*
100%{_var}/log/*
101%{_localstatedir}/*
102PBROOTINSTALL
103
104%changelog
105PBLOG
Note: See TracBrowser for help on using the repository browser.