]>
Commit | Line | Data |
---|---|---|
12b9aa58 ER |
1 | # TODO |
2 | # - get evaluation key from http://www.oxygenxml.com/register.html | |
94c76483 ER |
3 | # |
4 | # Conditional build: | |
5 | %bcond_without inst # build without using installer | |
6 | ||
12b9aa58 ER |
7 | Summary: <oXygen/> XML Editor |
8 | Name: oxygen-editor | |
9 | Version: 12.1 | |
94c76483 | 10 | Release: 0.2 |
12b9aa58 ER |
11 | License: ? |
12 | Group: Development/Tools | |
13 | Source0: http://www.oxygenxml.com/InstData/Editor/Linux/VM/oxygen32.sh | |
14 | # NoSource0-md5: 5b1be07b602c0e94e6d49d6600b89f22 | |
15 | NoSource: 0 | |
16 | Source1: http://www.oxygenxml.com/InstData/Editor/Linux64/VM/oxygen64.sh | |
17 | # NoSource1-md5: 012ee56a167af4a8979f3e8fb7078360 | |
18 | NoSource: 1 | |
19 | URL: http://www.oxygenxml.com/download_oxygenxml_editor.html | |
94c76483 ER |
20 | BuildRequires: jdk >= 1.6 |
21 | BuildRequires: symlinks | |
12b9aa58 ER |
22 | Requires: jdk >= 1.6 |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %define _appdir %{_libdir}/%{name} | |
26 | ||
94c76483 ER |
27 | # avoid strip abortion: |
28 | # /usr/bin/strip: Unable to recognise the format of the input file `/usr/lib64/oxygen-editor/lib/com/sun/jna/linux-ia64/libjnidispatch.so' | |
29 | %define _noautostrip .*/libjnidispatch.so | |
30 | ||
12b9aa58 ER |
31 | %description |
32 | <oXygen/> XML Editor is a complete XML development platform providing | |
33 | the necessary tools for working with a wide range of XML standards and | |
34 | technologies: | |
35 | - XML editing | |
36 | - XML conversion | |
37 | - XML Schema development | |
38 | - XSLT/ XQuery/ XPath execution and debugging | |
39 | - SOAP and WSDL testing | |
40 | - Native XML and relational database support | |
41 | ||
42 | %prep | |
94c76483 | 43 | %setup -qcT |
12b9aa58 ER |
44 | %ifarch %{ix86} |
45 | SOURCE=%{SOURCE0} | |
46 | %endif | |
47 | %ifarch %{x8664} | |
48 | SOURCE=%{SOURCE1} | |
49 | %endif | |
94c76483 | 50 | %if %{without inst} |
12b9aa58 ER |
51 | offset=$(grep -a 'tail -c' $SOURCE | awk '{print $3}') |
52 | tail -c $offset $SOURCE > sfx_archive.tar.gz | |
53 | tar zxf sfx_archive.tar.gz | |
94c76483 ER |
54 | grep -aoE totalDataLength=[0-9]+ $SRC | cut -d= -f2 > totalDataLength.txt |
55 | %endif | |
12b9aa58 ER |
56 | ln -s $SOURCE src.sh |
57 | ||
58 | %install | |
59 | rm -rf $RPM_BUILD_ROOT | |
94c76483 | 60 | install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}} |
12b9aa58 ER |
61 | |
62 | # nuke previous install info, confuses our answers sequence | |
63 | export HOME=$(pwd) | |
64 | rm -f $HOME/.java/.userPrefs/com/install4j/installations/prefs.xml | |
65 | ||
94c76483 ER |
66 | export INSTALL4J_TEMP=$(pwd) |
67 | export INSTALL4J_KEEP_TEMP=yes | |
68 | ||
12b9aa58 ER |
69 | # command sequence to installer |
70 | cat > cmd.txt <<EOF | |
71 | 2 | |
72 | o | |
94c76483 ER |
73 | %if %{with inst} |
74 | ||
75 | ||
76 | ||
77 | ||
78 | ||
79 | ||
80 | ||
81 | ||
82 | ||
83 | ||
84 | ||
85 | ||
86 | ||
87 | %endif | |
12b9aa58 ER |
88 | 1 |
89 | $RPM_BUILD_ROOT%{_appdir} | |
90 | 1,2,3 | |
91 | y | |
92 | $RPM_BUILD_ROOT%{_bindir} | |
93 | y | |
94 | y | |
95 | EOF | |
96 | ||
94c76483 ER |
97 | %if %{with inst} |
98 | sh -x src.sh -c < cmd.txt | |
99 | %endif | |
100 | ||
101 | %if %{without inst} | |
102 | # make the license shorter not span screen to make install automation to work, | |
103 | # we package complete copy separetely anyway. | |
104 | head -n6 i4j_extf_15_1im7gi7.txt > lic.txt | |
105 | sed -i -e 's,i4j_extf_15_1im7gi7.txt,lic.txt,' i4jparams.conf | |
106 | ||
12b9aa58 ER |
107 | %java \ |
108 | -Dinstall4j.jvmDir="%java_home" \ | |
109 | -Dexe4j.moduleName="$(pwd)/src.sh" \ | |
94c76483 | 110 | -Dexe4j.totalDataLength=$(cat totalDataLength) \ |
12b9aa58 ER |
111 | -Dinstall4j.cwd="$(pwd)" \ |
112 | -Xmx128m \ | |
113 | -Dsun.java2d.noddraw=true \ | |
114 | -Di4j.vmov=true \ | |
115 | -Di4j.vpt=true \ | |
116 | -classpath i4jruntime.jar:user.jar:user/i4jCustom.jar \ | |
117 | com.install4j.runtime.launcher.Launcher launch \ | |
118 | com.install4j.runtime.installer.Installer false false "" "" false true false "" true true 0 0 "" 20 20 "Arial" "0,0,0" 8 500 "version 12.1" 20 40 "Arial" "0,0,0" 8 500 -1 -c < cmd.txt | |
94c76483 ER |
119 | %endif |
120 | ||
121 | symlinks -c $RPM_BUILD_ROOT%{_bindir} | |
12b9aa58 ER |
122 | |
123 | %clean | |
124 | rm -rf $RPM_BUILD_ROOT | |
125 | ||
126 | %files | |
127 | %defattr(644,root,root,755) | |
94c76483 ER |
128 | %attr(755,root,root) %{_bindir}/* |
129 | # TODO: implicit attrs | |
130 | %defattr(-,root,root,-) | |
131 | %{_appdir} |