-
Notifications
You must be signed in to change notification settings - Fork 0
/
zmrepo.spec
71 lines (52 loc) · 2.01 KB
/
zmrepo.spec
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
# Unified zmrepo specfile for all supported distros
%if 0%{?fedora}
%global zmrepo_mjr_ver %{fedora}
%global distro fedora
%else
%global zmrepo_mjr_ver %{rhel}
%global distro rhel
%endif
Name: zmrepo
Version: %{zmrepo_mjr_ver}
Release: 3%{?dist}
Summary: Zoneminder and its dependencies for %{distro} %{zmrepo_mjr_ver}
Group: System Environment/Daemons
License: GPLv2
URL: https://github.com/ZoneMinder/zmrepo-srpm
Source0: https://github.com/ZoneMinder/zmrepo-srpm/archive/master.tar.gz
BuildArch: noarch
BuildRequires: coreutils
Requires: rpmfusion-free-release = %{zmrepo_mjr_ver}
%{?rhel:Requires: epel-release >= %{zmrepo_mjr_ver}}
%description
This package contains the ZoneMinder (zmrepo) repository
GPG keys as well as configuration for yum/dnf.
%prep
%autosetup -n zmrepo-srpm-master
# $releasever does not expand as expected on rhel, so replace it
%if 0%{?rhel}
sed -i 's!$releasever!%{rhel}!' repo/zmrepo-rhel.repo
%endif
%build
# Nothing to build
%install
# Create folders in buildroot
%{__mkdir} -p %{buildroot}%{_sysconfdir}/pki/rpm-gpg
%{__mkdir} -p %{buildroot}%{_sysconfdir}/yum.repos.d
# Install the repo config file
install -pm 0644 repo/zmrepo-%{distro}.repo %{buildroot}%{_sysconfdir}/yum.repos.d
# Insall the GPG Key
install -pm 0644 gpg/RPM-GPG-KEY-zmrepo %{buildroot}%{_sysconfdir}/pki/rpm-gpg
%files
%license LICENSE
%config(noreplace) /etc/yum.repos.d/zmrepo-%{distro}.repo
%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-zmrepo
%changelog
* Fri Dec 27 2019 Andrew Bauer <[email protected]> - %{version}-3
- Removed requirement for distro-release package, as it was problematic
- Added requirement for rpmfusion-free-release
* Fri Dec 27 2019 Andrew Bauer <[email protected]> - %{version}-2
- Fix source0 & autosetup
- Don't use $releasever, it's not expanding as expected on RHEL.
* Wed Dec 25 2019 Andrew Bauer <[email protected]> - %{version}-1
- zmrepo yum/dnf repo config