81 lines
2.0 KiB
RPMSpec
81 lines
2.0 KiB
RPMSpec
Summary: Manage a start page for all clients
|
|
Name: startpage
|
|
Version: 0.9
|
|
Release: 3.ns6
|
|
URL: https://github.com/libreschool/startpage/
|
|
License: GPLv3+
|
|
Packager: Paolo Asperti <paolo@asperti.com>
|
|
Group: System Environment/Daemons
|
|
BuildRoot: %{_tmppath}/%{name}-root
|
|
BuildRequires: nethserver-devtools > 1.0.1
|
|
BuildRequires: hunspell-en
|
|
Requires: httpd, sudo,
|
|
Requires: nethserver-base
|
|
Requires: python-jinja2
|
|
Requires: net-tools
|
|
Source0: %{name}-%{version}-%{release}.tar.gz
|
|
Source1: createlinks.pl
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
Manage a start page for all clients.
|
|
|
|
%prep
|
|
%setup -n %{name}-%{version}-%{release}
|
|
|
|
%build
|
|
%{makedocs}
|
|
perl createlinks.pl
|
|
|
|
%install
|
|
rm -Rf $RPM_BUILD_ROOT
|
|
(cd root ; find . -depth -print | cpio -dump %{buildroot})
|
|
rm -f %{name}-%{version}-%{release}-filelist
|
|
%{genfilelist} %{buildroot} > %{name}-%{version}-%{release}-filelist
|
|
|
|
%post
|
|
/etc/e-smith/events/actions/initialize-default-databases
|
|
|
|
if [ "$1" = 1 ]; then
|
|
#installation
|
|
/sbin/e-smith/db startpage set configuration configuration status enabled template default outfile /var/www/html/index.html
|
|
/sbin/e-smith/db startpage set link1 link enable yes imagelink "startpage/libreschool_logo.svg" link "https://community.libreschool.org/" title "Libreschool Community"
|
|
/sbin/e-smith/expand-template /etc/httpd/conf.d/startpage.conf
|
|
service httpd restart
|
|
/sbin/e-smith/signal-event startpage-refresh
|
|
fi
|
|
if [ "$1" = 2 ]; then
|
|
#upgrade
|
|
/sbin/e-smith/expand-template /etc/httpd/conf.d/startpage.conf
|
|
service httpd restart
|
|
/sbin/e-smith/signal-event startpage-refresh
|
|
fi
|
|
|
|
|
|
|
|
%postun
|
|
#if [ "$1" = 1 ]; then
|
|
#upgrade
|
|
#fi
|
|
if [ "$1" = 0 ]; then
|
|
#uninstallation
|
|
/sbin/e-smith/db configuration delete startpage
|
|
fi
|
|
|
|
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
|
|
%files -f %{name}-%{version}-%{release}-filelist
|
|
%defattr(0644,root,root,755)
|
|
%doc README.md COPYING
|
|
|
|
%changelog
|
|
* Wed Jul 18 2018 Paolo Asperti <paolo@asperti.com> - 0.9-3
|
|
- ui fixing
|
|
|
|
* Sun Jul 8 2018 Paolo Asperti <paolo@asperti.com> - 0.9-2
|
|
- bug fixing
|
|
|
|
* Sun Jul 8 2018 Paolo Asperti <paolo@asperti.com> - 0.9-1
|
|
- initial release |