-
Notifications
You must be signed in to change notification settings - Fork 8
/
hda-ctl.spec
160 lines (137 loc) · 5.61 KB
/
hda-ctl.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
%global rubyrelease 2.2.3
Name: hda-ctl
Version: 11.1.0
Release: 1
Summary: hda-ctl is the Amahi HDA daemon.
Group: System Environment/Daemons
License: GPL
Source: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: hda-platform >= 10.0.0
Requires: bash >= 4.2.48-2
Requires: dnsmasq, sudo >= 1.7.2
Requires: mariadb-server samba httpd
Requires: ruby(release) >= %{rubyrelease}
Requires: monit perl-Authen-PAM fpaste
Requires: rubygem-mysql2 ruby-libs ruby-augeas rubygem(bundler) rubygem(ruby-dbus) rubygem(json)
Requires: perl-Authen-PAM perl-libwww-perl perl-LWP-Protocol-https wget curl
Requires: cadaver php php-mysqlnd perl-URI filesystem rsync cronie pmount bc
Requires: php-gd php-mbstring php-xml php-mcrypt
Requires: bind-utils psmisc
Requires: systemd
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
BuildRequires: make gcc
%define debug_package %{nil}
%description
hda-ctl is the Amahi HDA daemon process.
%prep
%setup -q
make hda-ctl-hup
%build
%install
rm -rf %{buildroot}
%{__mkdir} -p %{buildroot}%{_bindir}
%{__mkdir} -p %{buildroot}%{_initrddir}
%{__mkdir} -p %{buildroot}%{_sysconfdir}/sysconfig
%{__mkdir} -p %{buildroot}/var/cache
%{__mkdir} -p %{buildroot}%{_sysconfdir}/httpd/conf.d
%{__mkdir} -p %{buildroot}%{_sysconfdir}/sudoers.d
%{__mkdir} -p %{buildroot}/var/hda
%{__mkdir} -p %{buildroot}/usr/share/hda-ctl
%{__mkdir} -p %{buildroot}/etc/skel/Desktop
%{__mkdir} -p %{buildroot}/root/Desktop
%{__mkdir} -p %{buildroot}%{_sysconfdir}/logrotate.d
%{__install} -m 755 -p hda-ctl hda-install %{buildroot}%{_bindir}
%{__install} -m 755 -p hda-settings hda-alias hda-install-file %{buildroot}%{_bindir}
%{__install} -m 755 -p hda-register-apps hda-install-gem %{buildroot}%{_bindir}
%{__install} -m 755 -p hda-change-gw hda-change-dns amahi-installer hda-php-zone-change hda-fix-sudoers hda-change-network %{buildroot}%{_bindir}
# FIXME - remove after a while. added on Mon Feb 28 01:16:51 PST 2011
%{__install} -m 4755 -p hda-ctl-hup %{buildroot}%{_bindir}
%{__install} -m 0440 -p hda-privs %{buildroot}%{_sysconfdir}/sudoers.d/amahi
%{__install} -D -m 0644 -p hda-ctl.service %{buildroot}%{_unitdir}/hda-ctl.service
%{__install} -D -m 0644 -p amahi-installer.service %{buildroot}%{_unitdir}/amahi-installer.service
%{__install} -p hda-ctl.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/hda-ctl
%{__install} -p amahi-hda %{buildroot}/usr/share/hda-ctl/amahi-hda
%{__install} -p -m 0755 mount_shares_locally %{buildroot}/usr/share/hda-ctl/
%{__install} -m 0644 -p hda-ctl.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/hda-ctl
%{__install} -D -m 0644 -p amahi-release %{buildroot}%{_sysconfdir}/amahi-release
%{__mkdir} -p %{buildroot}%{_prefix}/lib/systemd/system-preset/
%{__install} -D -m 0644 -p 70-amahi.preset %{buildroot}%{_prefix}/lib/systemd/system-preset/70-amahi.preset
%{__cp} -a desktop-icons/ %{buildroot}/etc/skel/Desktop
%{__cp} -a desktop-icons/ %{buildroot}/root/Desktop
%{__cp} -a web-installer %{buildroot}/usr/share/hda-ctl/
# periodic updates
%{__mkdir} -p %{buildroot}%{_sysconfdir}/cron.hourly
%{__install} -m 700 -p hda-update %{buildroot}%{_sysconfdir}/cron.hourly
# base initialitation
%{__cp} -a httpd %{buildroot}/usr/share/hda-ctl/
# file server non-destructive initialization for later
%{__cp} -a samba %{buildroot}/usr/share/hda-ctl/
%{__mkdir} -p %{buildroot}/var/hda/files/Backups
%{__mkdir} -p %{buildroot}/var/hda/files/Books
%{__mkdir} -p %{buildroot}/var/hda/files/Docs
%{__mkdir} -p %{buildroot}/var/hda/files/Videos
%{__mkdir} -p %{buildroot}/var/hda/files/Movies
%{__mkdir} -p %{buildroot}/var/hda/files/Music
%{__mkdir} -p %{buildroot}/var/hda/files/Pictures
%{__mkdir} -p %{buildroot}/var/hda/files/Public
%clean
rm -rf %{buildroot}
%post
%systemd_post hda-ctl.service amahi-installer.service
%{__mkdir} -p /var/hda/files
if [[ -e /var/cache/hda-ctl.cache ]]; then
if grep -q yes /var/cache/hda-ctl.cache ; then
(/usr/sbin/usermod -a -G users apache) || true
fi
fi
%preun
%systemd_preun hda-ctl.service amahi-installer.service
%postun
%systemd_postun_with_restart hda-ctl.service
%files
%defattr(-,root,root,-)
%{_bindir}/amahi-installer
%{_bindir}/hda-alias
%{_bindir}/hda-change-dns
%{_bindir}/hda-change-gw
%{_bindir}/hda-change-network
%{_bindir}/hda-ctl
%{_bindir}/hda-fix-sudoers
%{_bindir}/hda-install
%{_bindir}/hda-install-file
%{_bindir}/hda-install-gem
%{_bindir}/hda-php-zone-change
%{_bindir}/hda-register-apps
%{_bindir}/hda-settings
%{_sysconfdir}/sysconfig/hda-ctl
%{_sysconfdir}/skel/Desktop
%{_sysconfdir}/amahi-release
/root/Desktop/*
%{_sysconfdir}/cron.hourly/hda-update
%attr(0440, root, root)%{_sysconfdir}/sudoers.d/amahi
%ghost %attr(0775, apache, users) /var/hda/files
%attr(4755, root, root) %{_bindir}/hda-ctl-hup
/usr/share/hda-ctl/*
%attr(0644,root,root) %{_unitdir}/hda-ctl.service
%attr(0644,root,root) %{_unitdir}/amahi-installer.service
%config(noreplace) %{_sysconfdir}/logrotate.d/hda-ctl
%{_prefix}/lib/systemd/system-preset/70-amahi.preset
%changelog
* Sun Jun 18 2017 carlos puchol <[email protected]>
- remove strict password checking
- add mount_shares_locally
* Mon Mar 4 2013 carlos puchol <[email protected]>
- add logrotate
* Sun Jan 13 2013 carlos puchol <[email protected]>
- rename to hda-ctl and start on f18 port
* Sun Mar 11 2007 carlos puchol <[email protected]>
- added hda.repo, and many other improvements
* Sat Mar 10 2007 carlos puchol <[email protected]>
- add hda-install skeleton
* Sat Dec 09 2006 carlos puchol <[email protected]>
- initial file
* Mon Feb 20 2006 carlos puchol <[email protected]>
- add hda-ctl-hup, with uid