-
Notifications
You must be signed in to change notification settings - Fork 2
/
amahi-netboot.spec
61 lines (46 loc) · 1.56 KB
/
amahi-netboot.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
Name: amahi-netboot
Version: 0.7
Release: 1
Summary: Amahi Netboot - Boot over the network
Group: System Environment/Daemons
License: GPL
Source: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Requires: tftp-server xinetd
%define debug_package %{nil}
%define _binaries_in_noarch_packages_terminate_build 0
%description
Amahi Netboot - Boot over the network from your HDA
%prep
%setup -q
%build
%install
%{__mkdir} -p %{buildroot}/var/lib/tftpboot/
%{__cp} -a tftp/* %{buildroot}/var/lib/tftpboot/
%{__mkdir} -p %{buildroot}%{_sysconfdir}/dnsmasq.d/
%{__cp} -a amahi-pxe.conf %{buildroot}%{_sysconfdir}/dnsmasq.d/
%clean
rm -rf %{buildroot}
%post
# restart dns
if [[ -a /etc/xinetd.d/tftp ]] ; then
sed -i -e 's|disable.*=.*$|disable = no|' /etc/xinetd.d/tftp
/bin/systemctl enable xinetd.service &> /dev/null
/bin/systemctl restart dnsmasq.service &> /dev/null
fi
%preun
%files
%defattr(-,root,root,-)
/var/lib/tftpboot/*
%{_sysconfdir}/dnsmasq.d/amahi-pxe.conf
%changelog
* Wed Jan 29 2014 Carlos Puchol <[email protected]>
- thanks to damonq for the patches
- updated amahi-pxe.conf added lines: enable-tftp tftp-root=/var/lib/tftpboot
- updated amahi-pxe.conf removed ip entry
- updated amahi-netboot.spec: added "define" entry to resolve build error "Arch dependent binaries in noarch package"
* Wed Jul 17 2013 Carlos Puchol <[email protected]>
- updated for fedora 19
* Sun Aug 2 2009 Carlos Puchol <[email protected]>
- initial version