]> git.pld-linux.org Git - packages/lms.git/blobdiff - lms.spec
- missing dir in -lmsd, -scripts no longer own /usr/sbin
[packages/lms.git] / lms.spec
index 29e7796c63b14566e93dbdc8c9ae3d5eb679f80e..00ecf16ce413be915631fae2d7f66c3bd5d344dd 100644 (file)
--- a/lms.spec
+++ b/lms.spec
@@ -6,18 +6,17 @@
 # Conditional build:
 %bcond_without lmsd            # without lmsd daemon
 #
-%define                lmsver          1.6
-%define                lmssubver       6
+%define                lmsver          1.8
+%define                lmssubver       0
 Summary:       LAN Managment System
 Summary(pl):   System Zarz±dzania Sieci± Lokaln±
 Name:          lms
 Version:       %{lmsver}.%{lmssubver}
-Release:       2
-License:       GPL
-Vendor:                LMS Developers
+Release:       1
+License:       GPL v2
 Group:         Networking/Utilities
 Source0:       http://lms.rulez.pl/download/%{lmsver}/%{name}-%{version}.tar.gz
-# Source0-md5: 8500349fc938d66504dca033abc3a5f5
+# Source0-md5: afa0680e112dc14c4fbb41d9ec2eedee
 Source1:       %{name}.conf
 Source2:       %{name}.init
 Source3:       %{name}.sysconfig
@@ -27,14 +26,14 @@ URL:                http://lms.rulez.pl/
 %{?with_lmsd:BuildRequires:    libgadu-devel}
 %{?with_lmsd:BuildRequires:    mysql-devel}
 %{?with_lmsd:BuildRequires:    postgresql-devel}
+BuildRequires: rpmbuild(macros) >= 1.268
 %{?with_lmsd:Requires(post,preun):     /sbin/chkconfig}
-Requires:      Smarty >= 2.6.2
+Requires:      Smarty >= 2.6.10-4
 Requires:      php
 Requires:      php-gd
 Requires:      php-iconv
 Requires:      php-pcre
 Requires:      php-posix
-%{?with_lmsd:Requires: rc-scripts}
 Requires:      webapps
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -132,7 +131,8 @@ Prosty interfejs u
 Summary:       LAN Managment System - LMS system backend
 Summary(pl):   LAN Managment System - backend systemu LMS
 Group:         Networking/Utilities
-Requires:      %{name} = %{version}-%{release}
+Requires(post,preun):  /sbin/chkconfig
+Requires:      rc-scripts
 Obsoletes:     lms-almsd
 
 %description lmsd
@@ -141,7 +141,7 @@ upon LMS database and restarting selected services.
 
 %description lmsd -l pl
 Program zarz±dzaj±cy serwerem poprzez tworzenie plików
-konfiguracyjnych na podstawie bazy danych LMS'a i restartowanie
+konfiguracyjnych na podstawie bazy danych LMS-a i restartowanie
 wybranych us³ug.
 
 %prep
@@ -158,7 +158,8 @@ cd daemon
 
 ./configure --with-mysql
 %{__make} \
-       CC='%{__cc}' CFLAGS='%{rpmcflags} -fPIC -DUSE_MYSQL -DLMS_LIB_DIR=\"%{_libdir}/lms/\" -I../..'
+       CC='%{__cc}' \
+       CFLAGS='%{rpmcflags} -fPIC -DUSE_MYSQL -DLMS_LIB_DIR=\"%{_libdir}/lms/\" -I../..'
 mv lmsd lmsd-mysql
 
 ./configure --with-pgsql
@@ -175,7 +176,7 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_sbindir} \
           $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
           $RPM_BUILD_ROOT/etc/lms/modules/{dns,ggnofity,nofity} \
-          $RPM_BUILD_ROOT{%{_lmsvar}/{backups,templates_c},%{_libdir}/lms} \
+          $RPM_BUILD_ROOT{%{_lmsvar}/{backups,templates_c,documents},%{_libdir}/lms} \
           $RPM_BUILD_ROOT%{_lmsdir}/www/{img,doc,user}
 
 install *.php $RPM_BUILD_ROOT%{_lmsdir}/www
@@ -213,17 +214,11 @@ rm -rf $RPM_BUILD_ROOT
 
 %post lmsd
 /sbin/chkconfig --add lmsd
-if [ -f /var/lock/subsys/lmsd ]; then
-       /etc/rc.d/init.d/lmsd restart >&2
-else
-       echo "Run \"/etc/rc.d/init.d/lmsd start\" to start lmsd daemon."
-fi
+%service lmsd restart "lmsd daemon"
 
 %preun lmsd
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/lmsd ]; then
-               /etc/rc.d/init.d/lmsd stop >&2
-       fi
+       %service lmsd stop
        /sbin/chkconfig --del lmsd
 fi
 
@@ -233,10 +228,10 @@ fi
 %triggerun -- apache1
 %webapp_unregister apache %{_webapp}
 
-%triggerin -- apache >= 2.0.0
+%triggerin -- apache < 2.2.0, apache-base
 %webapp_register httpd %{_webapp}
 
-%triggerun -- apache >= 2.0.0
+%triggerun -- apache < 2.2.0, apache-base
 %webapp_unregister httpd %{_webapp}
 
 %triggerpostun -- %{name} <= 1.0.4
@@ -269,7 +264,7 @@ rm -f /etc/httpd/httpd.conf/99_%{name}.conf
 
 %files
 %defattr(644,root,root,755)
-%doc doc/{AUTHORS,ChangeLog*,INSTALL,README,UPGRADE*,lms*}
+%doc doc/{AUTHORS,ChangeLog,INSTALL,README*,lms*}
 %dir %{_sysconfdir}
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.ini
 %dir %attr(750,root,http) %{_webapps}/%{_webapp}
@@ -279,6 +274,7 @@ rm -f /etc/httpd/httpd.conf/99_%{name}.conf
 %dir %{_lmsvar}
 %attr(770,root,http) %{_lmsvar}/backups
 %attr(770,root,http) %{_lmsvar}/templates_c
+%attr(770,root,http) %{_lmsvar}/documents
 #
 %dir %{_lmsdir}
 %{_lmsdir}/www
@@ -295,7 +291,6 @@ rm -f /etc/httpd/httpd.conf/99_%{name}.conf
 
 %files scripts
 %defattr(644,root,root,755)
-%dir %{_sbindir}
 %attr(755,root,root) %{_sbindir}/*
 
 %files sqlpanel
@@ -312,8 +307,12 @@ rm -f /etc/httpd/httpd.conf/99_%{name}.conf
 %files lmsd
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_sbindir}/lmsd-*
+%dir %{_libdir}/lms
 %attr(755,root,root) %{_libdir}/lms/*.so
 %attr(754,root,root) /etc/rc.d/init.d/lmsd
-/etc/lms/modules/*
+# XXX: dir shared with base
+%dir %{_sysconfdir}
+%dir %{_sysconfdir}/modules
+%{_sysconfdir}/modules/*
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
 %endif
This page took 0.324148 seconds and 4 git commands to generate.