File handbrake-unstable.spec of Package handbrake-unstable
210
1
# vim: set sw=4 ts=4 et:
2
# Copyright (c) 2009-2012 Pascal Bleser <pascal.bleser@opensuse.org>
3
#
4
# All modifications and additions to the file contributed by third parties
5
# remain the property of their copyright owners, unless otherwise agreed
6
# upon. The license for this file, and modifications and additions to the
7
# file, is the same license as for the pristine package itself (unless the
8
# license for the pristine package is not an Open Source License, in which
9
# case the license is the MIT License). An "Open Source License" is a
10
# license that conforms to the Open Source Definition (Version 1.9)
11
# published by the Open Source Initiative.
12
13
# Please submit bugfixes or comments via https://bugs.links2linux.org/
14
15
%define rev 6509
16
17
Name: handbrake-unstable
18
Version: 0.9.9.9+%{rev}
19
Conflicts: handbrake
20
# svn://svn.handbrake.fr/HandBrake/trunk#%{rev}
21
Source: HandBrake-svn%{rev}.tar.bz2
22
Release: 0
23
Summary: Multithreaded Video Transcoder
24
Source99: handbrake-unstable-rpmlintrc
25
Source101: http://download.handbrake.fr/handbrake/contrib/fdk-aac-v0.1.1-6-gbae4553.tar.bz2
26
Source102: http://download.handbrake.fr/handbrake/contrib/cmake-3.0.1.tar.gz
27
Source103: http://download.handbrake.fr/handbrake/contrib/libav-v10.1.tar.bz2
28
Source104: http://download.handbrake.fr/handbrake/contrib/libdvdnav-5.0.1-0-gaa3659d.tar.gz
29
Source105: http://download.handbrake.fr/handbrake/contrib/libdvdread-5.0.0-6-gcb1ae87.tar.gz
30
Source106: http://download.handbrake.fr/contrib/libmfx-v2014.tar.bz2
31
Source107: http://download.handbrake.fr/contrib/libvpx-v1.3.0.tar.bz2
32
Source108: http://download.handbrake.fr/contrib/x265-8768-5e604833c5aa-1.4.tar.bz2
33
Source109: http://download.handbrake.fr/handbrake/contrib/libbluray-0.5.0.tar.bz2
34
35
Patch0: HandBrake-0.9.9-no-builddate.patch
36
Patch1: handbrake-enable_local_fribidi.patch
37
URL: http://handbrake.fr/
38
Group: Productivity/Multimedia/Video/Editors and Convertors
39
License: GPL-2.0+
40
BuildRoot: %{_tmppath}/build-%{name}-%{version}
41
BuildRequires: python curl wget subversion
42
BuildRequires: libbz2-devel zlib-devel libgudev-1_0-devel
43
%if 0%{?suse_version} > 1230
44
BuildRequires: gtk3-devel >= 3.10
45
BuildRequires: gtkhtml-devel
46
%endif
47
BuildRequires: fribidi-devel
48
BuildRequires: dbus-1-glib-devel
49
BuildRequires: libicu-devel libnotify-devel
50
%if 0%{?suse_version} <= 1140
51
BuildRequires: hal-devel
52
BuildRequires: libwebkit-devel
53
%else
54
BuildRequires: libwebkitgtk3-devel
55
%endif
56
BuildRequires: sqlite3-devel libcurl-devel libxslt-devel
57
BuildRequires: gstreamer-0_10-devel gstreamer-0_10-plugins-base-devel
58
BuildRequires: gcc gcc-c++ make glibc-devel yasm nasm
59
BuildRequires: autoconf automake libtool intltool
60
BuildRequires: update-desktop-files
61
BuildRequires: libvorbis-devel libass-devel x264-devel libmp3lame-devel libtheora-devel
62
BuildRequires: libsamplerate-devel
63
64
%description
65
HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video
66
transcoder.
67
68
%package cli
69
Summary: Multithreaded Video Transcoder
70
Group: Productivity/Multimedia/Video/Editors and Convertors
71
72
%description cli
73
HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video
74
transcoder.
75
76
This package contains a command-line interface for Handbrake.
77
78
%if 0%{?suse_version} > 1230
79
%package gtk
80
Summary: Multithreaded Video Transcoder
81
Group: Productivity/Multimedia/Video/Editors and Convertors
82
83
%description gtk
84
HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video
85
transcoder.
86
87
This package contains a GTK+ graphical user interface for Handbrake.
88
%endif
89
90
%prep
91
%if 0%{?rev:1}
92
%setup -q -n "HandBrake-svn%{rev}"
93
%else
94
%setup -q -n "HandBrake-%{version}"
95
%endif
96
%patch -P 0 -p1
97
98
%if 0%{?suse_version} < 1200
99
%patch -P 1 -p1
100
%endif
101
102
# Copy 3rd party dependencies into expected locations:
103
%__mkdir download
104
for f in \
105
%{S:101} %{S:102} %{S:103} \
106
%{S:104} %{S:105} %{S:106} \
107
%{S:107} %{S:108} %{S:109} \
108
; do
109
%__ln_s "$f" download/
110
done
111
112
# check beforehand that the versions match what the
113
# build system expects:
114
missing=$PWD/.missing
115
%__grep -hE '\.FETCH\.url *=' contrib/*/module.defs \
116
| %__awk -F' =' '{print $2}' \
117
| while read url; do
118
f=$(echo "$url" | %__sed 's|^.*/||')
119
case $f in
120
bzip2*|libiconv*|pthreads*|zlib*) continue ;;
121
autoconf*|automake*|libtool*|m4*) continue ;;
122
pkg-config*) continue ;;
123
fontconfig*|freetype*|fribidi*|libass*) continue ;;
124
libogg*|libtheora*|libvorbis*|libsamplerate*) continue ;;
125
libxml2*) continue;;
126
x264*|lame*) continue ;;
127
yasm*) continue ;;
128
mingw-libgnurx*) continue ;;
129
esac
130
[ -e "download/$f" ] || echo "$url">>"$missing"
131
done
132
133
if test -e "$missing"; then
134
echo "ERROR: missing contrib source archives:" >&2
135
cat "$missing" >&2
136
exit 1
137
fi
138
139
%build
140
# will be removed when the makefiles are fixed, currently
141
# fails on openSUSE factory because of --as-needed
142
export SUSE_ASNEEDED=0
143
144
# try to remove build date from binaries... -- seife+obs@b1-systems.com
145
PKGDATE=$(date -r %{_sourcedir}/%{name}.changes +%Y%m%d)
146
sed -i -e "s/@BUILD@/$PKGDATE/" make/configure.py
147
148
%__mkdir build
149
./configure \
150
--force \
151
--build="$PWD/build" \
152
--prefix="%{buildroot}%{_prefix}" \
153
--strip="/bin/true" \
154
--optimize=speed \
155
%if 0%{?suse_version} <= 1230
156
--disable-gtk \
157
%endif
158
--debug=max
159
160
pushd build
161
#### get rid of __DATE__ and __TIME__ in fdk-aac
162
%__mkdir contrib
163
%__mkdir contrib/fdkaac
164
tar -xf %{S:101} -C contrib/fdkaac
165
find contrib/fdkaac/ -type f | xargs sed -i -e "s/__DATE__/\"$PKGDATE\"/"
166
find contrib/fdkaac/ -type f | xargs sed -i -e 's/__TIME__/"00:00:00"/'
167
touch contrib/fdkaac/.stamp.extract
168
pushd contrib/fdkaac/fdk-aac-v0.1.1-6-gbae4553
169
autoreconf -fi
170
popd
171
172
%__make libhb/project.h
173
%__make %{?_smp_mflags}
174
popd #build
175
176
%install
177
pushd build
178
%__make install
179
popd #build
180
181
if [ -e %{buildroot}%{_bindir}/ghb ]; then
182
%__ln_s ghb "%{buildroot}%{_bindir}/HandBrakeGUI"
183
fi
184
185
%suse_update_desktop_file -r ghb AudioVideo AudioVideoEditing
186
187
# -f because it might not be there if built without gtk...
188
%__rm -f "%{buildroot}%{_datadir}/icons"/*/*.cache
189
190
%clean
191
%{?buildroot:%__rm -rf "%{buildroot}"}
192
193
%files cli
194
%defattr(-,root,root)
195
%doc AUTHORS COPYING CREDITS NEWS THANKS
196
%{_bindir}/HandBrakeCLI
197
198
%if 0%{?suse_version} > 1230
199
%files gtk
200
%defattr(-,root,root)
201
%doc AUTHORS COPYING CREDITS NEWS THANKS
202
%{_bindir}/HandBrakeGUI
203
%{_bindir}/ghb
204
%{_datadir}/applications/ghb.desktop
205
%{_datadir}/icons/*/*/apps/hb-icon.*
206
/usr/share/locale/*/LC_MESSAGES/ghb.mo
207
%endif
208
209
%changelog
210