/[packages]/cauldron/apache-commons-launcher/current/SPECS/apache-commons-launcher.spec
ViewVC logotype

Contents of /cauldron/apache-commons-launcher/current/SPECS/apache-commons-launcher.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 92240 - (show annotations) (download)
Wed Apr 27 20:56:53 2011 UTC (12 years, 11 months ago) by dmorgan
File size: 5348 byte(s)
Rebuild after bootstrapping
1 %global base_name launcher
2 %global short_name commons-%{base_name}
3
4 Name: apache-%{short_name}
5 Version: 1.1
6 Release: %mkrel 7.20100521svn936225.2
7 Summary: A cross platform Java application launcher
8 Group: Development/Java
9 License: ASL 2.0
10 URL: http://commons.apache.org/%{base_name}/
11
12 # The last release of this package was many years ago and in that time there
13 # have only been two extremely minor changes to the source code, [1] and [2].
14 # It seems a new release is unlikely to be forthcoming in the near future.
15 #
16 # [1] - http://svn.apache.org/viewvc/commons/proper/launcher/trunk/src/java/org/apache/commons/launcher/ChildMain.java?r1=138801&r2=138803
17 # [2] - http://svn.apache.org/viewvc/commons/proper/launcher/trunk/src/java/org/apache/commons/launcher/Launcher.java?r1=138801&r2=138802
18 #
19 # During that time however, support for the maven 2 build system has been
20 # added. So in order to make my life easier as a maintainer, with regard to
21 # supporting OSGi manifests and installing poms, etc, I have elected to package
22 # a maven2 supporting snapshot instead of maintaining patches in our SRPM. As
23 # an added bonus, the snapshot also has more accurate javadocs.
24 #
25 # How to generate source tarball from source control:
26 # $ svn export -r 936225 http://svn.apache.org/repos/asf/commons/proper/launcher/trunk/ commons-launcher-1.1-src
27 # $ tar -zcf commons-launcher-1.1-src.tar.gz commons-launcher-1.1-src
28 Source0: %{short_name}-%{version}-src.tar.gz
29
30 # remove unnecessary build dependency on ant-optional (ant no longer ships this jar)
31 Patch0: %{short_name}-pom.patch
32
33 BuildArch: noarch
34
35 BuildRequires: java-devel >= 0:1.6.0
36 BuildRequires: jpackage-utils
37 BuildRequires: maven-antrun-plugin
38 BuildRequires: maven-assembly-plugin
39 BuildRequires: maven-compiler-plugin
40 BuildRequires: maven-idea-plugin
41 BuildRequires: maven-install-plugin
42 BuildRequires: maven-jar-plugin
43 BuildRequires: maven-javadoc-plugin
44 BuildRequires: maven-resources-plugin
45 BuildRequires: maven-doxia-sitetools
46 BuildRequires: maven-plugin-bundle
47 BuildRequires: maven-surefire-maven-plugin
48 BuildRequires: maven-surefire-provider-junit
49 Requires: java >= 0:1.6.0
50 Requires: jpackage-utils
51 Requires(post):jpackage-utils
52 Requires(postun):jpackage-utils
53
54 Provides: jakarta-%{short_name} = %{version}-%{release}
55 Obsoletes: jakarta-%{short_name} < %{version}-%{release}
56
57 %description
58 Commons-launcher eliminates the need for a batch or shell script to launch a
59 Java class. Some situations where elimination of a batch or shell script may
60 be desirable are:
61
62 * You want to avoid having to determining where certain application paths are
63 e.g. your application's home directory, etc. Determining this dynamically in
64 a Windows batch scripts is very tricky on some versions of Windows or when
65 soft links are used on Unix platforms.
66
67 * You want to avoid having to handle native file and path separators or native
68 path quoting issues.
69
70 * You need to enforce certain system properties.
71
72 * You want to allow users to pass in custom JVM arguments or system properties
73 without having to parse and reorder arguments in your script. This can be
74 tricky and/or messy in batch and shell scripts.
75
76 * You want to bootstrap system properties from a configuration file instead
77 hard-coding them in your batch and shell scripts.
78
79 * You want to provide localized error messages which is very tricky to do in
80 batch and shell scripts.
81
82 %package javadoc
83 Summary: API documentation for %{name}
84 Group: Development/Java
85 Requires: jpackage-utils
86 Obsoletes: jakarta-%{short_name}-javadoc < %{version}-%{release}
87
88 %description javadoc
89 %{summary}.
90
91 %prep
92 %setup -q -n %{short_name}-%{version}-src
93
94 # apply patches
95 %patch0 -p0 -b .orig
96
97 sed -i 's/\r//' README.txt LICENSE.txt NOTICE.txt
98 sed -i "s|\<groupId\>ant\<\/groupId\>|<groupId>org.apache.ant</groupId>|g" build.xml
99
100 %build
101 export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
102 mkdir -p $MAVEN_REPO_LOCAL
103
104 mvn-jpp -Dmaven.repo.local=$MAVEN_REPO_LOCAL install javadoc:javadoc
105
106 %install
107 rm -rf %{buildroot}
108
109 # jars
110 install -pD -T target/%{short_name}-%{version}.jar \
111 %{buildroot}%{_javadir}/%{short_name}-%{version}.jar
112 (cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|%{short_name}|%{name}|g"`; done)
113 (cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
114
115 # javadocs
116 install -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
117 cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}
118 ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
119
120 # pom
121 install -pD -T -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{short_name}.pom
122 %add_to_maven_depmap org.apache.commons %{short_name} %{version} JPP %{short_name}
123
124 # following line is only for backwards compatibility. New packages
125 # should use proper groupid org.apache.commons
126 %add_to_maven_depmap %{short_name} %{short_name} %{version} JPP %{short_name}
127
128 %clean
129 rm -rf %{buildroot}
130
131 %post
132 %update_maven_depmap
133
134 %postun
135 %update_maven_depmap
136
137 %files
138 %defattr(-,root,root,-)
139 %doc LICENSE.txt NOTICE.txt README.txt
140 %{_mavendepmapfragdir}/*
141 %{_mavenpomdir}/*
142 %{_javadir}/*
143
144 %files javadoc
145 %defattr(-,root,root,-)
146 %{_javadocdir}/%{name}-%{version}
147 %{_javadocdir}/%{name}
148

  ViewVC Help
Powered by ViewVC 1.1.30