65 lines
1.7 KiB
Plaintext
65 lines
1.7 KiB
Plaintext
%global project_version __VERSION__
|
|
%define debug_package %{nil}
|
|
|
|
Name: __PROGRAM__
|
|
Version: __VERSION__
|
|
Release: __RELEASE__
|
|
Summary: Next generation distributed, event-driven, parallel config management!
|
|
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
|
|
|
|
BuildRequires: golang
|
|
BuildRequires: golang-x-tools-stringer
|
|
BuildRequires: git-core
|
|
BuildRequires: mercurial
|
|
|
|
ExclusiveArch: %{go_arches}
|
|
|
|
%description
|
|
Next generation distributed, event-driven, parallel config management!
|
|
|
|
%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 README.md
|
|
%doc THANKS
|
|
%doc examples/*
|
|
|
|
# this changelog is auto-generated by git log
|
|
%changelog
|