-
Notifications
You must be signed in to change notification settings - Fork 64
/
oh-my-vagrant.spec.in
58 lines (47 loc) · 2.08 KB
/
oh-my-vagrant.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
%global project_version __VERSION__
Name: oh-my-vagrant
Version: __VERSION__
Release: __RELEASE__
Summary: An easy to use dev environment for using vagrant with puppet, docker and more!
License: AGPLv3+
URL: https://github.com/purpleidea/oh-my-vagrant
Source0: https://dl.fedoraproject.org/pub/alt/purpleidea/oh-my-vagrant/SOURCES/oh-my-vagrant-%{project_version}.tar.bz2
BuildArch: noarch
Requires: vagrant >= 1.6.5
Requires: vagrant-libvirt >= 0.0.24
# git should really be a "suggests", since technically it's optional
Requires: git
Requires: polkit-pkla-compat
# these deps are "runtime" because vagrant-hostmanager is built in userspace
# if vagrant-hostmanager is ever packaged, then these deps should go away...
Requires: ruby-devel
Requires: gcc
Requires: gcc-c++
Requires: libvirt-devel
%description
An easy to use dev environment for using vagrant with puppet, docker and more!
%prep
%setup -c -q -T -D -a 0
%build
%install
rm -rf %{buildroot}
# _datadir is typically /usr/share/
install -d -m 0755 %{buildroot}/%{_datadir}/oh-my-vagrant/
cp -r oh-my-vagrant-%{project_version}/* %{buildroot}/%{_datadir}/oh-my-vagrant/
echo %{project_version} > %{buildroot}/%{_datadir}/oh-my-vagrant/VERSION
mkdir -p %{buildroot}/%{_bindir}
install -m 0755 oh-my-vagrant-%{project_version}/bin/omv.sh %{buildroot}/%{_bindir}/omv
mkdir -p %{buildroot}%{_sysconfdir}/profile.d
install oh-my-vagrant-%{project_version}/extras/vagrant.bashrc -m 0755 %{buildroot}%{_sysconfdir}/profile.d/oh-my-vagrant.sh
# pkla file for users in vagrant group
# NOTE: this can apparently give you root access, see:
# https://bugzilla.redhat.com/show_bug.cgi?id=1187019#c10
mkdir -p %{buildroot}%{_sysconfdir}/polkit-1/localauthority/50-local.d/
install -m 0644 oh-my-vagrant-%{project_version}/extras/oh-my-vagrant.pkla %{buildroot}%{_sysconfdir}/polkit-1/localauthority/50-local.d/oh-my-vagrant.pkla
%files
%attr(0755, root, root) %{_sysconfdir}/profile.d/oh-my-vagrant.sh
%{_datadir}/oh-my-vagrant/*
%{_bindir}/omv
%{_sysconfdir}/polkit-1/localauthority/50-local.d/oh-my-vagrant.pkla
# this changelog is auto-generated by git log
%changelog