Alex Karasulu | 07d2049 | 2006-03-06 15:35:44 +0000 | [diff] [blame] | 1 | Summary: ${app.display.name} Server |
| 2 | Name: ${app} |
| 3 | Version: ${app.version} |
| 4 | Release: ${app.release} |
| 5 | License: ${app.license.type} |
| 6 | Group: System Environment/Daemons |
| 7 | URL: ${app.url} |
| 8 | Source0: %{name}-%{version}.tar.gz |
| 9 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
| 10 | |
| 11 | %description |
| 12 | ${app.description} |
| 13 | |
| 14 | %prep |
| 15 | echo $RPM_BUILD_ROOT |
| 16 | rm -rf $RPM_BUILD_ROOT |
| 17 | mkdir -p $RPM_BUILD_ROOT |
| 18 | cp -rf ${image.basedir} $RPM_BUILD_ROOT/%{name}-%{version} |
| 19 | cd $RPM_BUILD_ROOT |
| 20 | tar -zcvf /usr/src/redhat/SOURCES/%{name}-%{version}.tar.gz %{name}-%{version} |
| 21 | |
| 22 | %setup -q |
| 23 | |
| 24 | %build |
| 25 | cd $RPM_BUILD_ROOT/%{name}-%{version} |
| 26 | |
| 27 | %install |
| 28 | rm -rf $RPM_BUILD_ROOT |
| 29 | mkdir -p $RPM_BUILD_ROOT/usr/local/${app}-%{version}/bin |
| 30 | mkdir -p $RPM_BUILD_ROOT/usr/local/${app}-%{version}/conf |
| 31 | mkdir -p $RPM_BUILD_ROOT/usr/local/${app}-%{version}/lib/ext |
| 32 | mkdir -p $RPM_BUILD_ROOT/usr/local/${app}-%{version}/var/log |
| 33 | mkdir -p $RPM_BUILD_ROOT/usr/local/${app}-%{version}/var/run |
| 34 | mkdir -p $RPM_BUILD_ROOT/usr/local/${app}-%{version}/var/partitions |
| 35 | touch $RPM_BUILD_ROOT/usr/local/${app}-%{version}/var/log/${app}-stderr.log |
| 36 | touch $RPM_BUILD_ROOT/usr/local/${app}-%{version}/var/log/${app}-stdout.log |
| 37 | mkdir -p $RPM_BUILD_ROOT/etc/init.d |
| 38 | ${mk.docs.dirs} |
| 39 | ${mk.sources.dirs} |
| 40 | |
| 41 | pwd |
| 42 | install -m 755 ${image.basedir}/bin/${app} $RPM_BUILD_ROOT/usr/local/${app}-%{version}/bin/${app} |
| 43 | install -m 644 ${image.basedir}/bin/bootstrapper.jar $RPM_BUILD_ROOT/usr/local/${app}-%{version}/bin/bootstrapper.jar |
| 44 | install -m 644 ${image.basedir}/bin/logger.jar $RPM_BUILD_ROOT/usr/local/${app}-%{version}/bin/logger.jar |
| 45 | install -m 644 ${image.basedir}/bin/daemon.jar $RPM_BUILD_ROOT/usr/local/${app}-%{version}/bin/daemon.jar |
| 46 | install -m 644 ${image.basedir}/conf/bootstrapper.properties $RPM_BUILD_ROOT/usr/local/${app}-%{version}/conf/bootstrapper.properties |
| 47 | install -m 644 ${image.basedir}/conf/log4j.properties $RPM_BUILD_ROOT/usr/local/${app}-%{version}/conf/log4j.properties |
| 48 | install -m 744 ${image.basedir}/bin/${server.init} $RPM_BUILD_ROOT/etc/init.d/${app} |
| 49 | install -m 744 ${image.basedir}/bin/felix.jar $RPM_BUILD_ROOT/usr/local/${app}-%{version}/bin/felix.jar |
| 50 | install -m 644 ${image.basedir}/${app.license.name} $RPM_BUILD_ROOT/usr/local/${app}-%{version} |
| 51 | install -m 644 ${image.basedir}/${app.readme.name} $RPM_BUILD_ROOT/usr/local/${app}-%{version} |
| 52 | install -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 |
| 59 | rm -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} |