forked from purpleidea/mgmt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spec.in
66 lines (52 loc) · 1.83 KB
/
spec.in
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
%global project_version __VERSION__
%define debug_package %{nil}
Name: __PROGRAM__
Version: __VERSION__
Release: __RELEASE__
Summary: A next generation config management prototype!
License: GPLv3+
URL: https://github.com/purpleidea/mgmt
Source0: https://dl.fedoraproject.org/pub/alt/purpleidea/__PROGRAM__/SOURCES/__PROGRAM__-%{project_version}.tar.bz2
# graphviz should really be a "suggests", since technically it's optional
Requires: graphviz
# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
BuildRequires: golang-googlecode-tools-stringer
BuildRequires: git-core
BuildRequires: mercurial
ExclusiveArch: %{go_arches}
%description
A next generation config management prototype!
%prep
%setup -q
%build
make build
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/%{_unitdir}/
install -pm 0644 misc/__PROGRAM__.service %{buildroot}/%{_unitdir}/
# install the binary
mkdir -p %{buildroot}/%{_bindir}
install -m 0755 __PROGRAM__ %{buildroot}/%{_bindir}/__PROGRAM__
# profile.d bash completion
mkdir -p %{buildroot}%{_sysconfdir}/profile.d
install misc/bashrc.sh -m 0755 %{buildroot}%{_sysconfdir}/profile.d/__PROGRAM__.sh
# etc dir
mkdir -p %{buildroot}%{_sysconfdir}/__PROGRAM__/
install -m 0644 misc/example.conf %{buildroot}%{_sysconfdir}/__PROGRAM__/__PROGRAM__.conf
%files
%attr(0755, root, root) %{_sysconfdir}/profile.d/__PROGRAM__.sh
%{_bindir}/__PROGRAM__
%{_sysconfdir}/__PROGRAM__/*
%{_unitdir}/__PROGRAM__.service
# https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Documentation
# Please add docs one per line in alpha order to avoid diff churn.
%doc AUTHORS
%doc COPYING
%doc COPYRIGHT
%doc DOCUMENTATION.md
%doc README.md
%doc THANKS
%doc examples/*
# this changelog is auto-generated by git log
%changelog