Package gluegen2: Specfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | Group: Development/Other # BEGIN SourceDeps(oneline): BuildRequires(pre): rpm-macros-java # END SourceDeps(oneline) %filter_from_requires /.opt-share.etc.profile.ant/d BuildRequires: /proc rpm-build-java BuildRequires: jpackage-1.8-compat # see https://bugzilla.altlinux.org/show_bug.cgi?id=10382 %define _localstatedir %{_var} Name: gluegen2 Version: 2.3.2 Release: alt2_11jpp8 %global src_name gluegen-v%{version} Summary: Java/JNI glue code generator to call out to ANSI C License: BSD URL: http://jogamp.org/ Source0: http://jogamp.org/deployment/v%{version}/archive/Sources/%{src_name}.tar.xz Source1: http://jogamp.org/deployment/v%{version}/archive/Sources/jcpp-v%{version}.tar.xz Patch1: %{name}-0001-renamed-library.patch # gluegen2.spec: W: patch-not-applied Patch2: 0002-use-fedora-jni.patch # Applied with %%{_libdir} and %%{name} resolved Patch2: %{name}-0002-use-fedora-jni.patch Patch3: %{name}-0003-disable-executable-tmp-tests.patch Patch4: %{name}-0004-add-antlr-jar-to-all-targets.patch Patch5: %{name}-0005-use-system-antlib.patch Patch6: %{name}-0006-disable-static-libgcc.patch Patch7: %{name}-0007-add-ppc64-aarch64.patch Patch8: %{name}-0008-jcpp-remove-javax-api.patch Patch9: %{name}-fix-gcc-10.patch BuildRequires: gcc BuildRequires: jpackage-utils BuildRequires: ant-antlr BuildRequires: ant-contrib BuildRequires: ant-junit BuildRequires: cpptasks BuildRequires: maven-local Requires: jpackage-utils Source44: import.info %description GlueGen is a tool which automatically generates the Java and JNI code necessary to call C libraries. It reads as input ANSI C header files and separate configuration files which provide control over many aspects of the glue code generation. GlueGen uses a complete ANSI C parser and an internal representation (IR) capable of representing all C types to represent the APIs for which it generates interfaces. %package devel Group: Development/Other Summary: GlueGen2 devel utilities required to build JOGL2 BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: ant-antlr Requires: ant-contrib Requires: ant-junit Requires: cpptasks %description devel GlueGen devel utilities provide some ant targets and shared files to build application. %package javadoc Group: Development/Java Summary: Javadoc for GlueGen2 BuildArch: noarch %description javadoc Javadoc for GlueGen2. %package doc Group: Development/Java Summary: GlueGen's user manual BuildArch: noarch %description doc GlueGen's user manual. %prep %setup -n %{src_name} tar -xJf %{SOURCE1} -C jcpp --strip 1 %patch1 -p1 sed -e "s|%%{_libdir}|%{_libdir}|;s|%%{name}|%{name}|" %{PATCH2} \ >use-fedora-jni.patch /usr/bin/patch -s -p1 --fuzz=0 <use-fedora-jni.patch %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 # Remove bundled dependencies find -name "*.jar" -type f -exec rm {} \; find -name "*.apk" -type f -exec rm {} \; rm -fr make/lib # Fix wrong-script-end-of-line-encoding rm make/scripts/*.bat # Fix spurious-executable-perm chmod -x LICENSE.txt chmod -x doc/manual/index.html chmod -x src/native/*/* find src/java/ -type f -exec chmod -x {} + find make/scripts -type f -not -name "*.sh" -exec chmod -x {} + # Fix non-executable-script find make/scripts -type f -name "*.sh" -exec chmod +x {} + # Fix script-without-shebang find make/scripts -type f -name "*.sh" -exec sed -i -e '1i#!/bin/sh' {} + # Remove hardcoded classpath sed -i '/Class-Path/I d' make/Manifest # git executable should not be used, use true (to avoid checkout) instead sed -i 's/executable="git"/executable="true"/' make/build.xml # 7z executable is not provided, use true (to avoid archive) instead sed -i 's/executable="7z"/executable="true"/' make/jogamp-archivetasks.xml # mvn executable should not be used, use true (to avoid install) instead sed -i 's/executable="mvn"/executable="true"/' make/build.xml %build # Clean up some tests rm -f src/junit/com/jogamp/common/util/TestVersionSemantics.java src/junit/com/jogamp/junit/util/VersionSemanticsUtil.java cd make xargs -t ant <<EOF -verbose -Dc.compiler.debug=true -Djavacdebug=false %ifarch x86_64 -Djavac.memorymax=1024m %else -Djavac.memorymax=256m %endif -Dantlr.jar=%{_javadir}/antlr.jar -Djunit.jar=%{_javadir}/junit.jar -Dant.jar=%{_javadir}/ant.jar -Dant-junit.jar=%{_javadir}/ant/ant-junit.jar -Djavadoc.link=%{_javadocdir}/java all javadoc maven.install EOF %install mkdir -p %{buildroot}%{_javadir}/%{name} \ %{buildroot}%{_libdir}/%{name} \ %{buildroot}%{_jnidir} install build/gluegen.jar %{buildroot}%{_javadir}/%{name}.jar install build/gluegen-rt.jar %{buildroot}%{_jnidir}/%{name}-rt.jar ln -s ../../..%{_jnidir}/%{name}-rt.jar %{buildroot}%{_libdir}/%{name}/ install build/obj/libgluegen-rt.so %{buildroot}%{_libdir}/%{name}/lib%{name}-rt.so # Provide JPP pom mkdir -p %{buildroot}%{_mavenpomdir} install -pm 644 build/pom-gluegen.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom install -pm 644 build/pom-gluegen-rt.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}-rt.pom %add_maven_depmap JPP-%{name}.pom %{name}.jar %add_maven_depmap JPP-%{name}-rt.pom %{name}-rt.jar # Make the devel package. This package is needed to build JOGL2 %global gluegen_devel_dir %{_datadir}/gluegen2 %global inst_srcdir %{buildroot}%{gluegen_devel_dir} mkdir -p %{inst_srcdir} %{inst_srcdir}/build cp -rdf -t %{inst_srcdir} make cp build/artifact.properties %{inst_srcdir}/build/artifact.properties # Make the javadoc package mkdir -p %{buildroot}%{_javadocdir}/%{name} cp -rdf build/javadoc/gluegen/javadoc/* %{buildroot}%{_javadocdir}/%{name} # Make the doc package mkdir -p %{buildroot}%{_docdir}/%{name} cp -rdf doc/manual/* %{buildroot}%{_docdir}/%{name} cp LICENSE.txt %{buildroot}%{_docdir}/%{name}/ cp LICENSE.txt %{buildroot}%{_javadocdir}/%{name}/ %check cd make _JAVA_OPTIONS="-Djogamp.debug=true -Djava.library.path=../build/test/build/natives" xargs -t ant <<EOF -verbose -Djavacdebug=true -Dc.compiler.debug=true -Djavacdebuglevel=lines,vars,source -Dcommon.gluegen.build.done=true -Dantlr.jar=%{_javadir}/antlr.jar -Djunit.jar=%{_javadir}/junit.jar -Dant.jar=%{_javadir}/ant.jar -Dant-junit.jar=%{_javadir}/ant/ant-junit.jar -Dgluegen.jar=%{buildroot}%{_javadir}/%{name}.jar -Dgluegen-rt.jar=%{buildroot}%{_libdir}/%{name}/%{name}-rt.jar -Dswt.jar=%{_libdir}/eclipse/swt.jar junit.run EOF rm -fr %{buildroot}%{_jnidir}/test %files %{_docdir}/%{name}/LICENSE.txt %{_jnidir}/%{name}-rt.jar %{_libdir}/%{name} %{_mavenpomdir}/JPP-%{name}-rt.pom %files devel %{_docdir}/%{name}/LICENSE.txt %{_javadir}/%{name}.jar %{_mavenpomdir}/JPP-%{name}.pom %{_datadir}/maven-metadata/%{name}.xml %{gluegen_devel_dir} %files javadoc %{_javadocdir}/%{name} %files doc %{_docdir}/%{name} %changelog * Tue Apr 20 2021 Slava Aseev <ptrnine@altlinux.org> 2.3.2-alt2_11jpp8 - fix build with gcc-10 (-fno-common) * Wed Jan 29 2020 Igor Vlasenko <viy@altlinux.ru> 2.3.2-alt1_11jpp8 - fc update * Sat May 25 2019 Igor Vlasenko <viy@altlinux.ru> 2.3.2-alt1_10jpp8 - new version * Thu Apr 19 2018 Igor Vlasenko <viy@altlinux.ru> 2.3.2-alt1_8jpp8 - java update * Thu Nov 09 2017 Igor Vlasenko <viy@altlinux.ru> 2.3.2-alt1_7jpp8 - fc27 update * Tue Oct 17 2017 Igor Vlasenko <viy@altlinux.ru> 2.3.2-alt1_5jpp8 - new jpp release * Fri Nov 25 2016 Igor Vlasenko <viy@altlinux.ru> 2.3.2-alt1_4jpp8 - new version * Thu Feb 11 2016 Igor Vlasenko <viy@altlinux.ru> 2.2.4-alt2_3jpp8 - %%_jnidir set to /usr/lib/java * Tue Feb 02 2016 Igor Vlasenko <viy@altlinux.ru> 2.2.4-alt1_3jpp8 - new version * Mon Sep 08 2014 Igor Vlasenko <viy@altlinux.ru> 2.0.2-alt1_1jpp7 - new release * Fri Jul 25 2014 Igor Vlasenko <viy@altlinux.ru> 2.0-alt3_8jpp7 - build with ant-junit * Thu Jul 24 2014 Igor Vlasenko <viy@altlinux.ru> 2.0-alt3_7jpp7 - merged junit-junit4 * Mon Apr 01 2013 Igor Vlasenko <viy@altlinux.ru> 2.0-alt2_7jpp7 - fixed build with new junit * Thu Feb 14 2013 Igor Vlasenko <viy@altlinux.ru> 2.0-alt1_7jpp7 - new release * Tue Jan 15 2013 Igor Vlasenko <viy@altlinux.ru> 2.0-alt1_6jpp7 - initial build |