Ignore:
Timestamp:
Mar 11, 2009, 6:48:41 AM (15 years ago)
Author:
Bryan Gartner
Message:

snapshot cleanup of packaging directives and precedence

File:
1 edited

Legend:

Unmodified
Added
Removed
  • projects/linuxcoe/pbconf/cvs/linuxcoe-sd-base/rpm/linuxcoe-sd-base.spec

    r384 r734  
    1 Summary: LinuxCOE SystemDesigner web interface
    21Name: PBPKG
    32Version: PBVER
    43Release: PBTAGPBSUF
     4Summary: LinuxCOE SystemDesigner web interface
     5
     6Group: PBGRP
    57License: GPL
    68URL: http://linuxcoe.sourceforge.net/
    7 Group: 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 #
    139Source: PBSRC
     10BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
    1411
    15 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
    1612BuildArch: noarch
    17 Requires: perl, sudo, PBDEP
     13#BuildRequires: ??
     14Requires: PBDEP
     15Provides: PBPROVIDE
    1816
    1917%description
     
    2523and retrofit already deployed systems by overlaying other value-add components.
    2624
     25%prep
    2726
    28 %prep
    2927%setup -q
    3028
    3129%build
    32 # For the moment done here. Would be better to give it to pb. Needs discussion
    33 export httpdcfgdir=PBHTTPDCONF
    34 export docrootdir=PBHTTPDDOCROOT
    35 export httpd_user=PBHTTPDUSER
    36 export httpd_group=PBHTTPDGROUP
    37 export sudoers_cfg=PBSUDOERS
    38 export webalias=PBWEBALIAS
    39 export 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
    43 make
     30./configure \
     31        webalias="PBwebalias" \
     32        webworkdir="PBwebworkdir" \
     33        httpdcfgdir="PBhttpdcfgdir" \
     34        httpd_user="PBhttpd_user" \
     35        httpd_group="PBhttpd_group" \
     36        sudoers_cfg="PBsudoers_cfg" \
     37        --prefix=PBprefix \
     38        --sysconfdir=PBsysconfdir \
     39        --localstatedir=%{_var} \
     40        --without-MKISOFS \
     41        --without-PERLMOD \
     42        --without-PALO \
     43        --without-SENDMAIL \
     44        --without-APACHECTL \
     45        --without-SUDO
    4446
    4547%install
    46 %{__rm} -rf %{buildroot}
    47 make DESTDIR="$RPM_BUILD_ROOT" install
    48 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d
    49 export VARLOG=%{_var}/log
    50 cat > $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 }
    64 EOF
     48%{__rm} -rf $RPM_BUILD_ROOT
     49make DESTDIR=$RPM_BUILD_ROOT install
    6550
    66 %post
    67 #
    68 # Invoke post action script
    69 #
    70 PBROOTINSTALL/bin/post-actions -i -v
    71 /etc/init.d/httpd reload
    72 if [ -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
    79 fi
    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
     51# scriptlets
    9052
    9153%clean
     
    9355
    9456%files
    95 %defattr(-,root,root)
    96 %config(noreplace) PBETCINSTALL
    97 %config %{_sysconfdir}/logrotate.d/LinuxCOE
     57%defattr(-,root,root,-)
     58%config(noreplace) PBsysconfdir/linuxcoe.rc
     59%config(noreplace) PBsysconfdir/includes/LinuxCOE-SystemDesigner.conf
     60%config(noreplace) PBsysconfdir/includes/config.state
     61%config(noreplace) PBsysconfdir/includes/sudoers
     62%config(noreplace) /etc/logrotate.d/LinuxCOE-SystemDesigner
    9863%doc AUTHORS ChangeLog COPYING INSTALL NEWS README
    99 %{_var}/cache/*
    100 %{_var}/log/*
    101 %{_localstatedir}/*
    102 PBROOTINSTALL
     64%{_var}/cache/PBPROVIDE
     65%{_var}/lib/PBPROVIDE
     66%{_var}/log/PBPROVIDE
     67PBprefix
    10368
    10469%changelog
Note: See TracChangeset for help on using the changeset viewer.