1 |
%define name ajenti |
2 |
%define version 1.2.22 |
3 |
%define unmangled_version 1.2.22 |
4 |
%define release 4 |
5 |
|
6 |
Summary: The server administration panel |
7 |
Name: %{name} |
8 |
Version: %{version} |
9 |
Release: %mkrel %{release} |
10 |
Source0: %{name}-%{version}.tar.gz |
11 |
License: AGPLv3 |
12 |
Group: System/Configuration |
13 |
BuildArch: noarch |
14 |
Url: http://ajenti.org/ |
15 |
BuildRequires: coffee-script |
16 |
BuildRequires: nodejs-less |
17 |
|
18 |
BuildRequires: python-gevent |
19 |
BuildRequires: python-greenlet |
20 |
BuildRequires: python-lxml |
21 |
BuildRequires: openssl |
22 |
BuildRequires: python-gevent-socketio |
23 |
BuildRequires: python-gevent-websocket |
24 |
BuildRequires: python-psutil >= 0.6.0 |
25 |
BuildRequires: python-imaging |
26 |
BuildRequires: python-daemon |
27 |
BuildRequires: python-passlib |
28 |
BuildRequires: python-requests |
29 |
BuildRequires: python-reconfigure >= 0.1.46 |
30 |
BuildRequires: python-catcher |
31 |
BuildRequires: python-exconsole >= 0.1.5 |
32 |
BuildRequires: python-ldap |
33 |
|
34 |
# mageia dbus package does not have egg file |
35 |
Requires: python-dbus |
36 |
|
37 |
|
38 |
%description |
39 |
Web admin panel |
40 |
|
41 |
%prep |
42 |
%setup -q -n %{name}-%{unmangled_version} -n %{name}-%{unmangled_version} |
43 |
sed -e 's/dbus-python//' -i requirements.txt |
44 |
|
45 |
%build |
46 |
make |
47 |
|
48 |
%install |
49 |
python setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --prefix=/usr |
50 |
install -p -D -m 0644 packaging/files/ajenti.service %{buildroot}%{_unitdir}/ajenti.service |
51 |
rm %{buildroot}/etc/init.d/ajenti |
52 |
rm %{buildroot}%{_localstatedir}/lib/ajenti/plugins/.placeholder |
53 |
|
54 |
%files |
55 |
%config(noreplace) /etc/ajenti/config.json |
56 |
%{_unitdir}/ajenti.service |
57 |
%{_localstatedir}/lib/ajenti/plugins |
58 |
%{_bindir}/ajenti-panel |
59 |
%{_bindir}/ajenti-ipc |
60 |
%{_bindir}/ajenti-ssl-gen |
61 |
%{python_sitelib}/ajenti |
62 |
%{python_sitelib}/ajenti-*-py?.?.egg-info |
63 |
|
64 |
%post |
65 |
ajenti-ssl-gen `hostname` |
66 |
%_post_service %{name} |
67 |
|
68 |
echo ------------------------------------------------ |
69 |
echo Ajenti will listen on HTTPS port 8000 by default |
70 |
echo |
71 |
echo Default username : root |
72 |
echo Default password : admin |
73 |
echo ------------------------------------------------ |
74 |
|
75 |
%preun |
76 |
%_preun_service %{name} |
77 |
|