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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 18198 - (show annotations) (download)
Fri Jan 14 23:46:57 2011 UTC (13 years, 3 months ago) by ahmad
File size: 3529 byte(s)
imported package jakarta-commons-launcher
1 %define base_name launcher
2 %define short_name commons-%{base_name}
3 %define name jakarta-%{short_name}
4 %define section free
5 %define gcj_support 1
6
7 Name: %{name}
8 Version: 1.1
9 Release: %mkrel 1.9
10 Epoch: 0
11 Summary: Cross-platform Java application launcher
12 License: Apache License
13 Group: Development/Java
14 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
15 #Vendor: JPackage Project
16 #Distribution: JPackage
17 URL: http://jakarta.apache.org/commons/launcher/
18 Source0: http://archive.apache.org/dist/jakarta/commons/launcher/source/%{short_name}-%{version}-src.tar.bz2
19 %if %{gcj_support}
20 BuildRequires: java-gcj-compat-devel
21 %else
22 Buildarch: noarch
23 %endif
24 BuildRequires: ant
25 BuildRequires: java-rpmbuild >= 0:1.5.30
26
27 %description
28 Commons-launcher eliminates the need for a batch or shell script to
29 launch a Java class. Some situations where elimination of a batch or
30 shell script may be desirable are:
31
32 * You want to avoid having to determining where certain application
33 paths are e.g. your application's home directory, etc. Determining this
34 dynamically in a Windows batch scripts is very tricky on some versions
35 of Windows or when softlinks are used on Unix platforms.
36 * You want to avoid having to handle native file and path separators or
37 native path quoting issues.
38 * You need to enforce certain system properties e.g. java.endorsed.dirs
39 when running with JDK 1.4.
40 * You want to allow users to pass in custom JVM arguments or system
41 properties without having to parse and reorder arguments in your script.
42 This can be tricky and/or messy in batch and shell scripts.
43 * You want to bootstrap system properties from a configuration file
44 instead hard-coding them in your batch and shell scripts.
45 * You want to provide localized error messages which is very tricky to
46 do in batch and shell scripts.
47
48
49 %package javadoc
50 Summary: Javadoc for %{name}
51 Group: Development/Java
52 BuildRequires: java-javadoc
53
54 %description javadoc
55 Javadoc for %{name}.
56
57
58 %prep
59 %setup -q -n %{short_name}
60
61
62 %build
63 mkdir lib
64 %ant \
65 -Dbuild.sysclasspath=only \
66 -Dfinal.name=%{short_name} \
67 -Dj2se.javadoc=%{_javadocdir}/java \
68 -Dsrcdir=. \
69 jar javadoc
70
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74
75 # jars
76 mkdir -p $RPM_BUILD_ROOT%{_javadir}
77 cp -p dist/bin/%{short_name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
78 (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|jakarta-||g"`; done)
79 (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
80
81 # javadoc
82 mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
83 cp -pr dist/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
84 ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
85
86 # fix end-of-line
87 %{__perl} -pi -e 's/\r$//g' *.txt
88
89 %if %{gcj_support}
90 %{_bindir}/aot-compile-rpm
91 %endif
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96 %if %{gcj_support}
97 %post
98 %{update_gcjdb}
99
100 %postun
101 %{clean_gcjdb}
102 %endif
103
104 %post javadoc
105 rm -f %{_javadocdir}/%{name}
106 ln -s %{name}-%{version} %{_javadocdir}/%{name}
107
108
109 %files
110 %defattr(0644,root,root,0755)
111 %doc LICENSE.txt
112 %{_javadir}/*
113 %if %{gcj_support}
114 %dir %{_libdir}/gcj/%{name}
115 %attr(-,root,root) %{_libdir}/gcj/%{name}/*
116 %endif
117
118 %files javadoc
119 %defattr(0644,root,root,0755)
120 %doc %{_javadocdir}/%{name}-%{version}
121 %ghost %doc %{_javadocdir}/%{name}
122
123
124
125

  ViewVC Help
Powered by ViewVC 1.1.30