fixup for older distros + updated Preference/About messages
[goodguy/cinelerra.git] / cinelerra-5.1 / blds / cinelerra.spec
1 %define ver 20201031
2 %define cin cinelerra
3 Summary: Multimedia Editing and construction
4
5 %if 0%{?hidepth}
6 %define xbit 10bit
7 %define xcfg --enable-x265_hidepth --with-exec-name=cinx
8 %endif
9
10 Name: %{cin}%{?xbit}
11 Version: 5.1
12 Release: %{ver}
13 License: GPL
14 Group: Applications/Multimedia
15 URL: https://cinelerra-gg.org/
16
17 # Obtained from :
18 # git clone git://git.cinelerra.org/goodguy/cinelerra.git cinelerra5
19 Source0: %{cin}-%{version}-%{ver}.tar.bz2
20 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
21
22 %if 0%{?fedora}
23 %define rhat 1
24 %define distro fedora
25 %endif
26 %if 0%{?centos}
27 %define rhat 1
28 %define distro centos
29 %define centos_cfg --disable-libaom --disable-libwebp --disable-dav1d
30 %endif
31
32 BuildRequires: autoconf
33 BuildRequires: automake
34 BuildRequires: cmake
35 BuildRequires: binutils
36 BuildRequires: ctags
37 BuildRequires: flac-devel
38 BuildRequires: freetype-devel
39 BuildRequires: gcc-c++
40 BuildRequires: gettext-devel
41 BuildRequires: git
42 BuildRequires: inkscape
43 BuildRequires: libpng-devel
44 BuildRequires: libXft-devel
45 BuildRequires: libXinerama-devel
46 BuildRequires: libXv-devel
47 BuildRequires: nasm
48 BuildRequires: libtool
49 BuildRequires: ncurses-devel
50 BuildRequires: texinfo
51 #BuildRequires: udftools
52 BuildRequires: gtk2-devel
53 BuildRequires: libva-devel
54 BuildRequires: libvdpau-devel
55 %{?rhat:BuildRequires: pulseaudio-libs-devel}
56 %{?rhat:BuildRequires: alsa-lib-devel}
57 %{?rhat:BuildRequires: bzip2-devel}
58 %{?rhat:BuildRequires: xorg-x11-fonts-cyrillic}
59 %{?rhat:BuildRequires: xorg-x11-fonts-cyrillic}
60 %{?rhat:BuildRequires: xorg-x11-fonts-ISO8859-1-100dpi}
61 %{?rhat:BuildRequires: xorg-x11-fonts-ISO8859-1-75dpi}
62 %{?rhat:BuildRequires: xorg-x11-fonts-misc}
63 %{?rhat:BuildRequires: xorg-x11-fonts-Type1}
64 %{?suse:BuildRequires: libpulse-devel}
65 %{?suse:BuildRequires: alsa-devel}
66 %{?suse:BuildRequires: libbz2-devel}
67 %{?suse:BuildRequires: bitstream-vera-fonts}
68 %{?suse:BuildRequires: xorg-x11-fonts-core}
69 %{?suse:BuildRequires: xorg-x11-fonts}
70 %{?suse:BuildRequires: dejavu-fonts}
71 %{?suse:BuildRequires: libnuma-devel}
72 BuildRequires: xz-devel
73 BuildRequires: yasm
74 BuildRequires: zlib-devel
75
76 %description
77 Multimedia editing and construction
78
79 %prep
80 %define _buildsubdir %{cin}-%{version}
81 %setup -q -n %{cin}-%{version}
82 %build
83 ./autogen.sh
84 %configure %{?xcfg} %{?centos_cfg}
85 %{__make}
86
87 %install
88 %make_install
89
90 %clean
91 %{__rm} -rf %{buildroot}
92
93 %if 0%{?rhat}
94 %post
95 if [ -d /etc/yum.repos.d ]; then
96  echo  > /etc/yum.repos.d/cin.repo "[cin]"
97  echo >> /etc/yum.repos.d/cin.repo "name=cinelerra-gg"
98  echo >> /etc/yum.repos.d/cin.repo "baseurl=https://cinelerra-gg.org/download/pkgs/%{distro}\$releasever/"
99  echo >> /etc/yum.repos.d/cin.repo "enabled=1"
100  echo >> /etc/yum.repos.d/cin.repo "gpgcheck=0"
101 fi
102 %postun
103 if [ -d /etc/yum.repos.d ]; then
104  rm -f /etc/yum.repos.d/cin.repo
105 fi
106 %endif
107
108 %files
109 %defattr(-, root, root, -)
110 %{_bindir}/*
111 %{_libdir}/*
112 %{_datadir}/*
113
114 %changelog
115