perfsonar-dev - perfsonar: r3672 - trunk/surfnet_java-flowsa-ma/contrib
Subject: perfsonar development work
List archive
- From:
- To:
- Subject: perfsonar: r3672 - trunk/surfnet_java-flowsa-ma/contrib
- Date: Tue, 15 Apr 2008 08:16:47 -0400
Author: gijs
Date: 2008-04-15 08:16:47 -0400 (Tue, 15 Apr 2008)
New Revision: 3672
Modified:
trunk/surfnet_java-flowsa-ma/contrib/surfnet_java-flowsa-ma.specs
Log:
Modified: trunk/surfnet_java-flowsa-ma/contrib/surfnet_java-flowsa-ma.specs
===================================================================
--- trunk/surfnet_java-flowsa-ma/contrib/surfnet_java-flowsa-ma.specs
2008-04-15 12:16:26 UTC (rev 3671)
+++ trunk/surfnet_java-flowsa-ma/contrib/surfnet_java-flowsa-ma.specs
2008-04-15 12:16:47 UTC (rev 3672)
@@ -1,15 +1,10 @@
-# TODO: I'm not sure about the name yet. I hate het surfnet_java-flowsa-ma
name for
-# usage in dir structure, and i think it isn't a valid rpm/deb package name.
-#
-%define shortname flowsa-ma
-%define fullname surfnet_java-%{shortname}
-%define appdir /home/perfsonar/webapps
+%define base /opt/perfsonar
+%define prefix %{base}/services/%{name}
-Name: %{fullname}
-# TODO: is it possible to replace this with SVN tag?
+Name: surfnet_java-flowsa-ma
Version: 0.1
License: GPL
-Release: 3perfsonar
+Release: 3
Summary: PERFsonar flow selection and aggregation Measurement Archive
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
@@ -17,29 +12,18 @@
packager: Gijs Molenaar
<>
URL: http://www.perfsonar.org
Requires: perfsonar-tomcat, nfdump
-
BuildArch: noarch
BuildRequires: maven2
-BuildRequires: ant
-# TODO: more buildreq?
-
%description
PEFsonar flow selection and aggregation Measurement Archive
Complicated Tomcat service that encapulates nfdump output in XML.
-## I prefer to svn export from svn in the BUILD dir, so we don't need
extract from tar.gz
-#%prep
-#%{__rm} -rf ${RPM_BUILD_DIR}/%{name}-%{version}
-#%setup -q
+%prep
+%{__rm} -rf ${RPM_BUILD_DIR}/%{name}-%{version}
+%setup -q
-%post
-%{__ln_s} /home/perfsonar/webapps/%{shortname}
/home/perfsonar/perfsonar-tomcat/webapps/%{shortname}
-%{__ln_s}
%{appdir}/%{shortname}/WEB-INF/classes/perfsonar/conf/service.properties
%{_sysconfdir}/flowsa-ma/service.properties
-
-
-
%build
pushd ${RPM_BUILD_DIR}/%{name}-%{version}
# we use maven to build our project.
@@ -52,32 +36,42 @@
%install
# make the directory
rm -rf $RPM_BUILD_ROOT
-%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{appdir}
-%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/flowsa-ma
-%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{appdir}/%{shortname}
-%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{_var}/run/flowsa-nfcapd
+%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{prefix}
+%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}
+%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{_var}/run/%{name}-nfcapd
%{__install} -d -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/init.d
# copy the service content to the tomcat webapps directory
pushd ${RPM_BUILD_DIR}/%{name}-%{version}/build
- %{__mv} %{shortname}-%{version}/* ${RPM_BUILD_ROOT}%{appdir}/%{shortname}
+ %{__cp} -a flowsa-ma-%{version}/* ${RPM_BUILD_ROOT}%{prefix}
popd
pushd ${RPM_BUILD_DIR}/%{name}-%{version}
- %{__cp} contrib/fedora-flowsa.rc
${RPM_BUILD_ROOT}%{_sysconfdir}/init.d/flowsa-nfcapd
+ %{__cp} contrib/fedora-flowsa.rc
${RPM_BUILD_ROOT}%{_sysconfdir}/init.d/%{name}-nfcapd
popd
+%post
+## make symlink so service shows up in tomcat
+%{__ln_s} %{prefix} %{base}/tomcat/webapps/%{name}
+## make symlink for easy access to conf
+%{__ln_s} %{prefix}/WEB-INF/classes/perfsonar/conf/service.properties
%{_sysconfdir}/%{name}/service.properties
+%preun
+## remove symlink
+%{__rm} -rf %{base}/tomcat/webapps/%{name}
+%{__rm} -rf %{_sysconfdir}/%{name}/service.properties
+
+
+
%clean
# clean up the durt
rm -rf $RPM_BUILD_ROOT
%files
%defattr(0644,root,perfsonar,0755)
-%attr(755,perfsonar,perfsonar) %{_var}/run/flowsa-nfcapd
-%attr(755,root,root) %{_sysconfdir}/init.d/flowsa-nfcapd
-%attr(640,perfsonar,perfsonar) %config(noreplace)
%{appdir}/%{shortname}/WEB-INF/classes/perfsonar/conf/service.properties
-%attr(640,perfsonar,perfsonar) %config(noreplace)
%{appdir}/%{shortname}/WEB-INF/classes/perfsonar/conf/servlet.properties
-%{appdir}/%{shortname}
-%{_sysconfdir}/flowsa-ma
+%attr(755,perfsonar,perfsonar) %{_var}/run/%{name}-nfcapd
+%attr(755,root,root) %{_sysconfdir}/init.d/%{name}-nfcapd
+%attr(640,perfsonar,perfsonar) %config(noreplace)
%{prefix}/WEB-INF/classes/perfsonar/conf/*.properties
+%{prefix}
+%{_sysconfdir}/%{name}
- perfsonar: r3672 - trunk/surfnet_java-flowsa-ma/contrib, svnlog, 04/15/2008
Archive powered by MHonArc 2.6.16.