File handbrake.spec of Package handbrake (Revision 82f95867b3185e3d048bfdb8792ad74a)

Currently displaying revision 82f95867b3185e3d048bfdb8792ad74a , Show latest

171
 
1
#
2
# spec file for package handbrake
3
#
4
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
5
# Copyright (c) 2014 B1 Systems GmbH, Vobhurg, Germany
6
#
7
# All modifications and additions to the file contributed by third parties
8
# remain the property of their copyright owners, unless otherwise agreed
9
# upon. The license for this file, and modifications and additions to the
10
# file, is the same license as for the pristine package itself (unless the
11
# license for the pristine package is not an Open Source License, in which
12
# case the license is the MIT License). An "Open Source License" is a
13
# license that conforms to the Open Source Definition (Version 1.9)
14
# published by the Open Source Initiative.
15
16
# Please submit bugfixes or comments via http://bugs.opensuse.org/
17
#
18
19
20
Name:           handbrake
21
Summary:        Multithreaded Video Transcoder
22
Version:        1.2.1
23
Release:        0
24
Url:            http://handbrake.fr/
25
Source0:        https://download.handbrake.fr/releases/%{version}/HandBrake-%{version}-source.tar.bz2
26
Source1:        https://github.com/HandBrake/HandBrake/releases/download/%{version}/HandBrake-%{version}-source.tar.bz2.sig
27
Patch0:         HandBrake-no-builddate.patch
28
Patch1:         HandBrake-build-shared.patch
29
License:        GPL-2.0+
30
Group:          Productivity/Multimedia/Video/Editors and Convertors
31
BuildRequires:  autoconf
32
BuildRequires:  automake
33
BuildRequires:  cmake
34
BuildRequires:  curl
35
BuildRequires:  fdupes
36
BuildRequires:  gcc
37
BuildRequires:  gcc-c++
38
BuildRequires:  intltool
39
BuildRequires:  libtool
40
BuildRequires:  make
41
BuildRequires:  nasm
42
BuildRequires:  python > 2.7.3
43
BuildRequires:  subversion
44
BuildRequires:  update-desktop-files
45
BuildRequires:  wget
46
BuildRequires:  yasm
47
BuildRequires:  glibc-devel
48
BuildRequires:  libmp3lame-devel
49
BuildRequires:  pkgconfig(bzip2)
50
BuildRequires:  pkgconfig(dbus-glib-1)
51
BuildRequires:  pkgconfig(dvdnav)
52
BuildRequires:  pkgconfig(dvdread)
53
BuildRequires:  pkgconfig(ffnvcodec)
54
BuildRequires:  pkgconfig(gstreamer-1.0)
55
BuildRequires:  pkgconfig(gstreamer-plugins-base-1.0)
56
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.10
57
BuildRequires:  pkgconfig(gudev-1.0)
58
BuildRequires:  pkgconfig(libass)
59
BuildRequires:  pkgconfig(libavcodec) >= 58
60
BuildRequires:  pkgconfig(libavfilter) >= 7
61
BuildRequires:  pkgconfig(libavformat) >= 58
62
BuildRequires:  pkgconfig(libavresample) >= 4
63
BuildRequires:  pkgconfig(libavutil) >= 56
64
BuildRequires:  pkgconfig(libbluray) >= 1.0.2
65
BuildRequires:  pkgconfig(libswscale) >= 5
66
BuildRequires:  pkgconfig(libnotify)
67
BuildRequires:  pkgconfig(libxml-2.0)
68
BuildRequires:  pkgconfig(opus)
69
BuildRequires:  pkgconfig(samplerate)
70
BuildRequires:  pkgconfig(speex)
71
BuildRequires:  pkgconfig(theora)
72
BuildRequires:  pkgconfig(vorbis)
73
BuildRequires:  pkgconfig(vpx) >= 1.4
74
BuildRequires:  pkgconfig(x264)
75
BuildRequires:  pkgconfig(x265)
76
BuildRequires:  pkgconfig(jansson)
77
%ifarch armv6l || armv6hl
78
BuildRequires:  Mesa-libEGL1
79
BuildRequires:  Mesa-libEGL-devel
80
%endif
81
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
82
83
%description
84
HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video
85
transcoder.
86
87
%package cli
88
Summary:        Multithreaded Video Transcoder
89
Group:          Productivity/Multimedia/Video/Editors and Convertors
90
91
%description cli
92
HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video
93
transcoder.
94
95
This package contains a command-line interface for Handbrake.
96
97
%package gtk
98
Summary:        Multithreaded Video Transcoder
99
Group:          Productivity/Multimedia/Video/Editors and Convertors
100
Recommends:     handbrake-gtk-lang = %{version}-%{release}
101
102
%description gtk
103
HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video
104
transcoder.
105
106
This package contains a GTK+ graphical user interface for Handbrake.
107
108
%lang_package -n handbrake-gtk
109
110
%prep
111
%setup -q -n HandBrake-%{version}
112
%patch0 -p0
113
%patch1 -p0
114
115
%build
116
export CFLAGS="%{optflags} -fno-strict-aliasing -Wno-unused -I%{_includedir}/ffmpeg"
117
export CXXFLAGS="$CFLAGS -Wno-reorder"
118
export PATH="%{_builddir}/HandBrake-%{version}/build/contrib/bin:$PATH"
119
120
# try to remove build date from binaries... -- seife+obs@b1-systems.com
121
PKGDATE=$(date -r %{_sourcedir}/handbrake.changes +%Y%m%d)
122
sed -i -e "s/@BUILD@/$PKGDATE/" make/configure.py
123
124
%__mkdir build
125
./configure \
126
    --force \
127
    --build="$PWD/build" \
128
    --prefix=%{_prefix} \
129
    --strip="/bin/true" \
130
    --optimize=speed \
131
    --disable-fdk-aac \
132
    --debug=max
133
134
pushd build
135
%__make libhb/project.h
136
%__make %{?_smp_mflags}
137
popd
138
139
%install
140
%makeinstall -C build
141
142
%__ln_s ghb %{buildroot}%{_bindir}/HandBrakeGUI
143
144
%suse_update_desktop_file -r fr.handbrake.ghb AudioVideo AudioVideoEditing
145
146
# -f because it might not be there if built without gtk...
147
%__rm -f "%{buildroot}%{_datadir}/icons"/*/*.cache
148
149
%find_lang ghb
150
151
%fdupes %{buildroot}
152
153
%files cli
154
%defattr(-,root,root)
155
%doc COPYING NEWS.markdown THANKS.markdown
156
%{_bindir}/HandBrakeCLI
157
158
%files gtk
159
%defattr(-,root,root)
160
%doc COPYING NEWS.markdown THANKS.markdown
161
%{_bindir}/HandBrakeGUI
162
%{_bindir}/ghb
163
%{_datadir}/applications/fr.handbrake.ghb.desktop
164
%{_datadir}/icons/*/*/apps/hb-icon.*
165
%{_datadir}/icons/hicolor/scalable/apps/fr.handbrake.ghb.svg
166
%{_datadir}/metainfo/fr.handbrake.ghb.appdata.xml
167
168
%files -n handbrake-gtk-lang -f ghb.lang
169
170
%changelog
171