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