2 # - build it from sources
3 # https://hudson.dev.java.net/files/documents/2402/125619/hudson-1.280-src.zip
5 %include /usr/lib/rpm/macros.java
6 Summary: Hudson Continuous Build Server
11 Group: Networking/Daemons/Java/Servlets
12 # Check for new releases and URLs here: http://mirrors.jenkins-ci.org/war/?C=N;O=D
13 Source0: http://mirrors.jenkins-ci.org/war/%{version}/%{name}.war#/%{name}-%{version}.war
14 # Source0-md5: 1473fb2eba27d132bf00425d4b9f5032
17 URL: http://www.jenkins-ci.org/
18 BuildRequires: jpackage-utils
19 BuildRequires: rpm-javaprov
20 BuildRequires: rpmbuild(macros) >= 1.546
21 Obsoletes: hudson < 1.396
22 Requires: jpackage-utils
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Jenkins monitors executions of repeated jobs, such as building a
30 software project or jobs run by cron.
32 Among those things, current Jenkins focuses on the following two jobs:
33 - Building/testing software projects continuously, just like
34 CruiseControl or DamageControl. In a nutshell, Jenkins provides an
35 easy-to-use so-called continuous integration system, making it easier
36 for developers to integrate changes to the project, and making it
37 easier for users to obtain a fresh build. The automated, continoues
38 build increases the productivity.
39 - Monitoring executions of externally-run jobs, such as cron jobs and
40 procmail jobs, even those that are run on a remote machine. For
41 example, with cron, all you receive is regular e-mails that capture
42 the output, and it is up to you to look at them diligently and notice
43 when it broke. Jenkins keeps those outputs and makes it easy for you to
44 notice when something is wrong.
52 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
55 rm -rf $RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_datadir}/%{name},%{_sharedstatedir}/%{name},%{_tomcatconfdir}}
57 mv WEB-INF/web.xml $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/web.xml
58 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/tomcat-context.xml
59 ln -sf %{_sysconfdir}/%{name}/tomcat-context.xml $RPM_BUILD_ROOT%{_tomcatconfdir}/%{name}.xml
60 cp -a . $RPM_BUILD_ROOT%{_datadir}/%{name}
61 ln -sf %{_sysconfdir}/%{name}/web.xml $RPM_BUILD_ROOT%{_datadir}/%{name}/WEB-INF/web.xml
64 # If we have an old hudson install, rename it to jenkins
65 if test -d /var/lib/hudson; then
66 echo >&2 "Moving /var/lib/hudson -> /var/lib/jenkins"
67 # leave a marker to indicate this came from Hudson.
68 # could be useful down the road
69 # This also ensures that the .??* wildcard matches something
70 touch /var/lib/hudson/.moving-hudson
71 mv -f /var/lib/hudson/* /var/lib/hudson/.??* /var/lib/jenkins
74 if test -d /var/run/hudson; then
75 mv -f /var/run/hudson/* /var/run/jenkins
80 %tomcat_clear_cache %{name}
83 rm -rf $RPM_BUILD_ROOT
86 %defattr(644,root,root,755)
87 %dir %{_sysconfdir}/%{name}
88 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.xml
89 %{_tomcatconfdir}/%{name}.xml
91 %attr(2775,root,servlet) %dir %{_sharedstatedir}/%{name}