[packages/test/rpm5-trigger] test for webapp triggers

glen glen at pld-linux.org
Wed Nov 28 17:06:34 CET 2012


commit a3c6809dcf08927e72f496df87f11f7f7c56fe42
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed Nov 28 18:04:42 2012 +0200

    test for webapp triggers

 test.spec | 36 ++++++++++++++++++++++++++++--------
 1 file changed, 28 insertions(+), 8 deletions(-)
---
diff --git a/test.spec b/test.spec
index b2a04d8..54b6aa2 100644
--- a/test.spec
+++ b/test.spec
@@ -1,24 +1,44 @@
-%include	/usr/lib/rpm/macros.java
-Summary:	test package to run COMMAND like commands on builder :/
+Summary:	webapp test
 Name:		test
-Version:	5.3.11
-Release:	0.10
+Version:	0.1
+Release:	0.1
 License:	GPL
 Group:		Applications/System
-# extracted from http://rpm5.org/files/rpm/rpm-5.3/rpm-5.3.11-0.20110602.src.rpm
-Source0:	rpm-%{version}.tar.gz
-# Source0-md5:	7c1f624c22143324ee372dffd1a209c2
+BuildRequires:	rpmbuild(macros) >= 1.268
+Requires:	webapps
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define		_webapps	/etc/webapps
+%define		_webapp		%{name}
+%define		_sysconfdir	%{_webapps}/%{_webapp}
+
 %description
-rpm5.org distributes now in src.rpm format, but we need tar.gz
+zz
 
 %prep
 %setup -qcT
+touch lighttpd.conf
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_sysconfdir}
+cp -p lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
+
+%triggerin -- lighttpd
+set -x
+echo triggerin:%{N}-%{V}-%{R}
+%webapp_register lighttpd %{_webapp}
+
+%triggerun -- lighttpd
+set -x
+echo triggerun:%{N}-%{V}-%{R}
+%webapp_unregister lighttpd %{_webapp}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
+%dir %attr(750,root,http) %{_sysconfdir}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/test.git/commitdiff/a3c6809dcf08927e72f496df87f11f7f7c56fe42



More information about the pld-cvs-commit mailing list