Пакет gstreamer-java: 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 | # BEGIN SourceDeps(oneline): BuildRequires(pre): rpm-build-java BuildRequires: unzip # END SourceDeps(oneline) BuildRequires: /proc BuildRequires: jpackage-compat %define fedora 18 %global arch_with_swt %{ix86} x86_64 ppc ppc64 ia64 sparc sparc64 BuildArch: noarch Summary: Java interface to the gstreamer framework Name: gstreamer-java Version: 1.5 Release: alt1_4jpp7 License: LGPLv3 and CC-BY-SA Group: System/Libraries URL: http://code.google.com/p/gstreamer-java/ # zip -r ~/rpm/SOURCES/gstreamer-java-src-1.5.zip gstreamer-java -x \*/.svn* Source: http://gstreamer-java.googlecode.com/files/%{name}-src-%{version}.zip Patch1: gstreamer-java-swt.patch #Patch2: gstreamer-java-osx.patch Patch3: gstreamer-java-nameClash.patch Patch10: gstreamer-java-1.5.patch # for ExcludeArch and no noarch see bug: 468831 # since noarch pacakge can't contain ExcludeArch :-( imho it's an rpm bug ExcludeArch: ppc ppc64 # Don't build debuginfo packages since it's actualy a noarch package %global debug_package %{nil} Requires: jpackage-utils jna Requires: gstreamer gst-plugins-base gst-plugins-good BuildRequires: jpackage-utils jna BuildRequires: gstreamer-devel gst-plugins-devel gst-plugins-good BuildRequires: ant ant-junit %if 0%{?fedora} >= 9 || 0%{?rhel} > 5 BuildRequires: junit4 %endif %ifarch %{arch_with_swt} noarch BuildRequires: jna-contrib %if 0%{?fedora} >= 9 || 0%{?rhel} > 5 BuildRequires: eclipse-swt %else BuildRequires: libswt3-gtk2 %endif %endif Source44: import.info %description An unofficial/alternative set of java bindings for the gstreamer multimedia framework. %ifarch %{arch_with_swt} noarch %package swt Summary: SWT support for %{name} Group: System/Libraries Requires: %{name} = %{version}-%{release} BuildRequires: jna-contrib %if 0%{?fedora} >= 9 || 0%{?rhel} > 5 BuildRequires: eclipse-swt %else BuildRequires: libswt3-gtk2 %endif %description swt This package contains SWT support for %%{name}. %endif %package javadoc Summary: Javadocs for %{name} Group: Development/Java Requires: %{name} = %{version}-%{release} Requires: jpackage-utils BuildArch: noarch %description javadoc This package contains the API documentation for %%{name}. %prep %setup -q -n %{name} %ifarch %{arch_with_swt} noarch %patch1 -p1 -b .swt #upstreamed #%patch2 -p1 -b .osx %patch10 -p1 -b .15 %patch3 -p2 # replace included jar files with the system packaged version SWT sed -i -e "s,\(file.reference.swt.jar=\).*,\1$(find %{_libdir} -name swt*.jar 2>/dev/null|sort|head -1)," \ nbproject/project.properties %endif cp -p src/org/freedesktop/tango/COPYING COPYING.CC-BY-SA # remove prebuild binaries find . -name '*.jar' -delete # replace included jar files with the system packaged version (JNA, SWT, GStreamer plugins dir) sed -i -e "s,\(file.reference.jna.jar=\).*,\1$(build-classpath jna)," \ -e "s,\(file.reference.platform.jar=\).*,\1$(build-classpath jna/platform.jar)," \ -e "s,\(run.jvmargs=-Djna.library.path=\).*,\1%{_libdir}:$(pkg-config --variable=pluginsdir gstreamer-0.10)," \ nbproject/project.properties # from Fedora-9 we've got ant-1.7.0 and junit4 while on older releases and EPEL # have only ant-1.6.5 and junit-3.8.2 therefore on older releases and EPEL we # have small hacks like ant-1.6.5 need packagenames for javadoc task # and test targets need ant-1.7.x and junit4 so we skip the test during packaging %if 0%{?fedora} >= 9 || 0%{?rhel} > 5 sed -i -e "s,\(file.reference.junit4.jar=\).*,\1$(build-classpath junit4)," \ nbproject/project.properties %else sed -i -e 's,\(<javadoc destdir="${dist.javadoc.dir}" source="${javac.source}"\),\1 packagenames="*",' \ build.xml %endif %build ant jar javadoc %if 0%{?fedora} >= 9 || 0%{?rhel} > 5 %check #ant test %endif %install mkdir -p -m0755 %{buildroot}%{_javadir} install -m 0644 dist/*.jar %{buildroot}%{_javadir} mkdir -p -m0755 %{buildroot}%{_javadocdir}/%{name} cp -rp dist/javadoc/* %{buildroot}%{_javadocdir}/%{name} %files %{_javadir}/%{name}.jar %doc CHANGES COPYING* tutorials/* %ifarch %{arch_with_swt} noarch %files swt %{_javadir}/%{name}-swt.jar %endif %files javadoc %{_javadocdir}/%{name} %changelog * Fri Jan 11 2013 Igor Vlasenko <viy@altlinux.ru> 1.5-alt1_4jpp7 - initial build |