blob: c37912f1e65ec313e45617f45afc380fd1da4fe8 [file] [log] [blame]
Alex Karasulu07d20492006-03-06 15:35:44 +00001Summary: ${app.display.name} Server
2Name: ${app}
3Version: ${app.version}
4Release: ${app.release}
5License: ${app.license.type}
6Group: System Environment/Daemons
7URL: ${app.url}
8Source0: %{name}-%{version}.tar.gz
9BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
10
11%description
12${app.description}
13
14%prep
15echo $RPM_BUILD_ROOT
16rm -rf $RPM_BUILD_ROOT
17mkdir -p $RPM_BUILD_ROOT
18cp -rf ${image.basedir} $RPM_BUILD_ROOT/%{name}-%{version}
19cd $RPM_BUILD_ROOT
20tar -zcvf /usr/src/redhat/SOURCES/%{name}-%{version}.tar.gz %{name}-%{version}
21
22%setup -q
23
24%build
25cd $RPM_BUILD_ROOT/%{name}-%{version}
26
27%install
28rm -rf $RPM_BUILD_ROOT
29mkdir -p $RPM_BUILD_ROOT/usr/local/${app}-%{version}/bin
30mkdir -p $RPM_BUILD_ROOT/usr/local/${app}-%{version}/conf
31mkdir -p $RPM_BUILD_ROOT/usr/local/${app}-%{version}/lib/ext
32mkdir -p $RPM_BUILD_ROOT/usr/local/${app}-%{version}/var/log
33mkdir -p $RPM_BUILD_ROOT/usr/local/${app}-%{version}/var/run
34mkdir -p $RPM_BUILD_ROOT/usr/local/${app}-%{version}/var/partitions
35touch $RPM_BUILD_ROOT/usr/local/${app}-%{version}/var/log/${app}-stderr.log
36touch $RPM_BUILD_ROOT/usr/local/${app}-%{version}/var/log/${app}-stdout.log
37mkdir -p $RPM_BUILD_ROOT/etc/init.d
38${mk.docs.dirs}
39${mk.sources.dirs}
40
41pwd
42install -m 755 ${image.basedir}/bin/${app} $RPM_BUILD_ROOT/usr/local/${app}-%{version}/bin/${app}
43install -m 644 ${image.basedir}/bin/bootstrapper.jar $RPM_BUILD_ROOT/usr/local/${app}-%{version}/bin/bootstrapper.jar
44install -m 644 ${image.basedir}/bin/logger.jar $RPM_BUILD_ROOT/usr/local/${app}-%{version}/bin/logger.jar
45install -m 644 ${image.basedir}/bin/daemon.jar $RPM_BUILD_ROOT/usr/local/${app}-%{version}/bin/daemon.jar
46install -m 644 ${image.basedir}/conf/bootstrapper.properties $RPM_BUILD_ROOT/usr/local/${app}-%{version}/conf/bootstrapper.properties
47install -m 644 ${image.basedir}/conf/log4j.properties $RPM_BUILD_ROOT/usr/local/${app}-%{version}/conf/log4j.properties
48install -m 744 ${image.basedir}/bin/${server.init} $RPM_BUILD_ROOT/etc/init.d/${app}
49install -m 744 ${image.basedir}/bin/felix.jar $RPM_BUILD_ROOT/usr/local/${app}-%{version}/bin/felix.jar
50install -m 644 ${image.basedir}/${app.license.name} $RPM_BUILD_ROOT/usr/local/${app}-%{version}
51install -m 644 ${image.basedir}/${app.readme.name} $RPM_BUILD_ROOT/usr/local/${app}-%{version}
52install -m 644 ${image.basedir}/${app.icon} $RPM_BUILD_ROOT/usr/local/${app}-%{version}
53${install.append.libs}
54${install.docs}
55${install.sources}
56${install.notice.file}
57
58%clean
59rm -rf $RPM_BUILD_ROOT
60
61%files
62%defattr(-,root,root,-)
63%doc ${app.license.name} ${app.readme.name}
64
65/etc/init.d/${app}
66/usr/local/${app}-%{version}/bin/${app}
67/usr/local/${app}-%{version}/bin/bootstrapper.jar
68/usr/local/${app}-%{version}/bin/logger.jar
69/usr/local/${app}-%{version}/bin/daemon.jar
70/usr/local/${app}-%{version}/bin/felix.jar
71/usr/local/${app}-%{version}/conf/log4j.properties
72/usr/local/${app}-%{version}/conf/bootstrapper.properties
73/usr/local/${app}-%{version}/conf/server.xml
74/usr/local/${app}-%{version}/lib/ext
75/usr/local/${app}-%{version}/var/run
76/usr/local/${app}-%{version}/var/log
77/usr/local/${app}-%{version}/var/partitions
78/usr/local/${app}-%{version}/var/log/${app}-stderr.log
79/usr/local/${app}-%{version}/var/log/${app}-stdout.log
80/usr/local/${app}-%{version}/${app.readme.name}
81/usr/local/${app}-%{version}/${app.license.name}
82/usr/local/${app}-%{version}/${app.icon}
83${verify.append.libs}
84${verify.docs}
85${verify.sources}
86${verify.notice.file}