-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathgstreamer-java.spec
More file actions
181 lines (141 loc) · 5.81 KB
/
gstreamer-java.spec
File metadata and controls
181 lines (141 loc) · 5.81 KB
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
%global arch_with_swt %{ix86} x86_64 ppc ppc64 ia64 sparc sparc64
Summary: Java interface to the gstreamer framework
Name: gstreamer-java
Version: 1.5
Release: 1%{?dist}
License: LGPLv3 and CC-BY-SA
Group: System Environment/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
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# 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: java >= 1:1.6.0, jpackage-utils, jna
Requires: gstreamer, gstreamer-plugins-base, gstreamer-plugins-good
BuildRequires: java-devel >= 1:1.6.0, jpackage-utils, jna
BuildRequires: gstreamer-devel, gstreamer-plugins-base-devel, gstreamer-plugins-good
BuildRequires: ant, ant-junit
%if 0%{?fedora} >= 9 || 0%{?rhel} > 5
BuildRequires: junit4
%endif
%ifarch %{arch_with_swt} noarch
BuildRequires: libswt3-gtk2, jna-contrib
%endif
%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 Environment/Libraries
Requires: %{name} = %{version}-%{release}
Requires: libswt3-gtk2, jna-contrib
%description swt
This package contains SWT support for %{name}.
%endif
%package javadoc
Summary: Javadocs for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
Requires: jpackage-utils
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q -n %{name}
%ifarch %{arch_with_swt} noarch
%patch1 -p1 -b .swt
# 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
rm -rf %{buildroot}
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}
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_javadir}/%{name}.jar
%doc CHANGES COPYING* tutorials/*
%ifarch %{arch_with_swt} noarch
%files swt
%defattr(-,root,root,-)
%{_javadir}/%{name}-swt.jar
%endif
%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}
%changelog
- update spec and bump version to 1.5
- add SWT subpackage and disable getStaticPadTemplates test
- fix spec file typo
- update to 1.4
- drop upstream XOverlay patch
- fix XOverlay on windows
- drop test from jar
- update to version 1.3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
- don't build debuginfo pacakges since it's actualy a noarch pacakge
- update to the new upstream version
- don't use build-classpath for SWT on any platform since it's broken in most cases
- add suport for platfrom which has no SWT support
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
- fix spec file to build on x86_64 too
- update to the new upstream version
- fix EPEL build problems (ant-1.7.0 and junit4)
- add ExcludeArch ppc, ppc64 because of bug 468831
- more spec file cleanup
- update to mercurial repo
- remove the manual subpackage and put into the man doc
- Initial release