All pastes #447848 Raw Edit

kyrh

public text v1 · immutable
·published 2007-04-19 10:25 UTC
rendered paste body
%define source %(echo $SOURCE)

Summary: Oilspace portal
Name: portal
Version: 162
Release: 1
Group: Applications/File
Vendor: Oilspace
License: Oilspace Commercial License
Source0: %{source}
Prefix: /opt/oilspace
BuildRoot: %{_tmppath}/%{name}-root
URL: http://www.oilspace.com
BuildArch: noarch

...

%package scripts
Summary: init scripts
Requires: portal >= %{version}
Group: Applications/File

%description
portal version %{version}

%description scripts
portal version %{version}

%prep
%setup -qc 'portal-%{version}'
%__mkdir_p $RPM_BUILD_ROOT

%build

# drop list
%__rm -r scripts/1.def
%__rm -r scripts/2.def
%__rm -r scripts/config/3.xml
%__rm -r scripts/config/3.processes
...

%install
%__mkdir_p "${RPM_BUILD_ROOT-/}"/opt/oilspace
%__cp -a . "${RPM_BUILD_ROOT-/}"/opt/oilspace/

%define DRSEARCH %(cd ${RPM_BUILD_ROOT; find ./opt -type d -not -path '*/scripts*' | sort -u | sed -e 's#^\.##')

%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"

%files
%defattr(-,oilspace,oilspace)
%DRSEARCH
%DRSEARCH/*

...

%files scripts
# scripts
%defattr(-,oilspace,oilspace)
/opt/oilspace/scripts/XXX
...