]> git.pld-linux.org Git - packages/vagrant.git/blame - vagrant.spec
create vagrant-guest package
[packages/vagrant.git] / vagrant.spec
CommitLineData
d9278297
ER
1#
2# Conditional build:
3%bcond_without vagrant # build vagrant package
4
2f2a2f85
ER
5Summary: Provisioning and deployment of virtual instances
6Name: vagrant
77d9f457 7Version: 1.1.2
d9278297 8Release: 0.6
2f2a2f85
ER
9License: MIT
10Group: Applications/Emulators
11URL: http://vagrantup.com/
77d9f457
ER
12Source0: http://files.vagrantup.com/packages/67bd4d30f7dbefa7c0abc643599f0244986c38c8/vagrant_i686.rpm?/%{name}-%{version}.i686.rpm
13# Source0-md5: 83093a71588f97a9eb69fa7fe07418b9
14Source1: http://files.vagrantup.com/packages/67bd4d30f7dbefa7c0abc643599f0244986c38c8/vagrant_x86_64.rpm?/%{name}-%{version}.x86_64.rpm
15# Source1-md5: 3efa3ac73988c565e6b3236da6867557
d9278297 16BuildRequires: bash
376b9a6d
ER
17BuildRequires: pkgconfig
18BuildRequires: rpm-pythonprov
32f7fb06 19BuildRequires: rpm-utils
376b9a6d 20BuildRequires: ruby
a08aa0c6 21BuildRequires: sed >= 4.0
376b9a6d 22BuildRequires: which
32f7fb06
ER
23ExclusiveArch: %{ix86} %{x8664}
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26%define _appdir %{_libdir}/%{name}
27
d9278297
ER
28%define vg_home /home/vagrant
29
32f7fb06
ER
30%define _enable_debug_packages 0
31%define no_install_post_strip 1
32%define no_install_post_check_so 1
33%define no_install_post_chrpath 1
2f2a2f85
ER
34
35%description
36Vagrant offers scripted provisioning and deployment of virtual
37instances. While VirtualBox is the main target, future versions may
38support other hypervizors as well.
39
40The vision of the project is to create a tool to transparently manage
41all the complex parts of modern development within a virtual
42environment without affecting the everyday workflow of the developer
43too much. A long term goal is moving all development into virtualized
44environments by making it easier to do so than not to. Additionally,
45work is ongoing to have Vagrant run identically on every major
46consumer OS platform (Linux, Mac OS X, and Windows).
47
d9278297
ER
48%package guest
49Summary: Vagrant guest
50Group: Development/Building
51Requires(postun): /usr/sbin/userdel
52Requires(pre): /bin/id
53Requires(pre): /usr/bin/getgid
54Requires(pre): /usr/sbin/groupadd
55Requires(pre): /usr/sbin/useradd
56Requires: openssh-server
57Provides: group(vagrant)
58Provides: user(vagrant)
59%if "%{_rpmversion}" >= "5"
60BuildArch: noarch
61%endif
62
63%description guest
64This is the package to be installed in Vagrant guest.
65
66WARNING: This package installs insecure keypair to vagant user. Do not
67install this package in a box that is accessible others but you.
68
69These keys are the "insecure" public/private keypair we offer to base
70box creators for use in their base boxes so that vagrant installations
71can automatically SSH into the boxes.
72
73See: <https://github.com/mitchellh/vagrant/tree/master/keys/>.
74
2f2a2f85
ER
75%package doc
76Summary: Documentation for %{name}
77Group: Documentation
78Requires: %{name} = %{version}-%{release}
79%if "%{_rpmversion}" >= "5"
80BuildArch: noarch
81%endif
82
83%description doc
84Ruby documentation for %{gem_name}
85
86%prep
32f7fb06
ER
87%setup -qcT
88%ifarch %{ix86}
89SOURCE=%{S:0}
90%endif
91%ifarch %{x8664}
92SOURCE=%{S:1}
93%endif
2f2a2f85 94
32f7fb06
ER
95V=$(rpm -qp --nodigest --nosignature --qf '%{V}' $SOURCE)
96test "$V" = "%{version}"
32f7fb06 97rpm2cpio $SOURCE | cpio -i -d
2f2a2f85 98
32f7fb06 99mv opt/vagrant/* .
2f2a2f85 100
be793ac6 101grep -rl /tmp/vagrant-temp embedded | xargs sed -i -e 's,/tmp/vagrant-temp,%{_appdir},'
a08aa0c6 102
2f2a2f85
ER
103%install
104rm -rf $RPM_BUILD_ROOT
d9278297 105%if %{with vagrant}
32f7fb06 106install -d $RPM_BUILD_ROOT{%{_bindir},%{_appdir}}
32f7fb06
ER
107cp -a bin embedded $RPM_BUILD_ROOT%{_appdir}
108ln -s %{_appdir}/bin/%{name} $RPM_BUILD_ROOT%{_bindir}
d9278297
ER
109%endif
110
111# guest
112install -d $RPM_BUILD_ROOT%{vg_home}/.ssh
113cp -a /etc/skel/.bash* $RPM_BUILD_ROOT%{vg_home}
2f2a2f85
ER
114
115%clean
116rm -rf $RPM_BUILD_ROOT
117
d9278297
ER
118%pre guest
119# FIXME: register user in uid_gid.db.txt
120%groupadd -g 2000 vagrant
121%useradd -u 2000 -g vagrant -G wheel -c "Vagrant user" -s /bin/bash -d %{vg_home} vagrant
122
123%postun guest
124if [ "$1" = "0" ]; then
125 %userremove vagrant
126 %groupremove vagrant
127fi
128
129%if %{with vagrant}
2f2a2f85
ER
130%files
131%defattr(644,root,root,755)
132%attr(755,root,root) %{_bindir}/vagrant
2f2a2f85 133
32f7fb06
ER
134%defattr(-,root,root,-)
135%{_appdir}
d9278297
ER
136%endif
137
138%files guest
139%defattr(644,root,root,755)
140%dir %attr(750,vagrant,vagrant) %{vg_home}
141%dir %attr(700,vagrant,vagrant) %{vg_home}/.ssh
142%dir %attr(640,vagrant,vagrant) %{vg_home}/.bash*
32f7fb06
ER
143
144%if 0
2f2a2f85
ER
145%files doc
146%defattr(644,root,root,755)
147%doc %{gem_docdir}
32f7fb06 148%endif
This page took 0.397348 seconds and 4 git commands to generate.