]> git.pld-linux.org Git - packages/lms.git/blobdiff - lms.spec
- release 11 (by relup.sh)
[packages/lms.git] / lms.spec
index 73789df538bc42394139550fde67088825298210..9454c02d38ff72339744adb917db59a5fced67d5 100644 (file)
--- a/lms.spec
+++ b/lms.spec
@@ -1,44 +1,60 @@
-# TODO: test build on amd64 and sheck /usr/lib64 patch
+# TODO:
+# - package documents/templates/default
+# - cosmetics (sort in %%files and %%install)
+# - consider contrib and samples (re)packaging
 #
 # Conditional build:
 %bcond_without lmsd            # without lmsd daemon
-#
-# TODO:
-# - cosmetics (sort in %%files and %%install)
-# - contrib split
-%define                lmsver          1.6
-%define                lmssubver       1
+%bcond_with    lmsd_debug      # with lmsd debugging
+
+%define                lmsver          1.11
+%define                lmssubver       13
 Summary:       LAN Managment System
-Summary(pl):   System Zarz±dzania Sieci± Lokaln±
+Summary(pl.UTF-8):     System Zarządzania Siecią Lokalną
 Name:          lms
 Version:       %{lmsver}.%{lmssubver}
-Release:       0.1
-License:       GPL
-Vendor:                LMS Developers
+Release:       11
+License:       GPL v2
 Group:         Networking/Utilities
-Source0:       http://lms.rulez.pl/download/%{lmsver}/%{name}-%{version}.tar.gz
-# Source0-md5: b9ace330b87a6253009a56358289821e
-Source1:       %{name}.conf
-Source2:       %{name}.init
-Source3:       %{name}.sysconfig
+Source0:       http://www.lms.org.pl/download/%{lmsver}/%{name}-%{version}.tar.gz
+# Source0-md5: 294899358ae2585a4030580d79a06ee8
+Source1:       %{name}.init
+Source2:       %{name}.sysconfig
+Source3:       %{name}-apache.conf
+Source4:       %{name}-httpd.conf
 Patch0:                %{name}-PLD.patch
 Patch1:                %{name}-amd64.patch
-URL:           http://lms.rulez.pl/
+Patch2:                %{name}-smarty.patch
+Patch3:                build.patch
+URL:           http://www.lms.org.pl/
+BuildRequires: bison
+BuildRequires: flex
 %{?with_lmsd:BuildRequires:    libgadu-devel}
 %{?with_lmsd:BuildRequires:    mysql-devel}
-%{?with_lmsd:BuildRequires:    postgresql-devel}
-%{?with_lmsd:PreReq:           rc-scripts}
+BuildRequires: net-snmp-devel
+%{?with_lmsd:BuildRequires:    postgresql-devel >= 8.2}
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.461
+BuildRequires: yacc
 %{?with_lmsd:Requires(post,preun):     /sbin/chkconfig}
-Requires:      php
-Requires:      php-gd
-Requires:      php-iconv
-Requires:      php-posix
-Requires:      php-pcre
-Requires:      webserver
-Requires:      Smarty >= 2.5.0
+Requires:      Smarty >= 2.6.18-2
+Requires:      php(gd)
+Requires:      php(iconv)
+Requires:      php(mbstring)
+Requires:      php(mysql)
+Requires:      php(pcre)
+Requires:      php(posix)
+Requires:      webapps
+Requires:      webserver(access)
+Requires:      webserver(alias)
+Requires:      webserver(php)
+Conflicts:     apache-base < 2.4.0-1
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sysconfdir     /etc/%{name}
+%define                _webapps        /etc/webapps
+%define                _webapp         %{name}
+%define                _smartyplugindir        %{php_data_dir}/Smarty/plugins
 %define                _lmsdir         %{_datadir}/%{name}
 %define                _lmsvar         /var/lib/%{name}
 
@@ -46,62 +62,62 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 This is a package of applications in PHP and Perl for managing LANs.
 It's using MySQL or PostgreSQL. The main goal is to get the best
 service of users at provider's level. The main features in LMS are:
-- database of users (name, surname, address, telefon number,
-  commentary);
-- database of computers (IP, MAC);
-- easy-ridden financial system and funds of network;
-- different subscriptions;
-- sending warnings to users;
-- many levels of access for LMS administrators;
+- database of users (name, surname, address, telephone number,
+  commentary),
+- database of computers (IP, MAC),
+- easy-ridden financial system and funds of network,
+- different subscriptions,
+- sending warnings to users,
+- many levels of access for LMS administrators,
 - autogenerating ipchains, iptables, dhcpd, ethers file, oidentd,
-  openbsd packet filter configuration files/scripts;
+  openbsd packet filter configuration files/scripts,
 - autogenerating almost any kind of config file using templates.
 
-%description -l pl
-"LMS" jest skrótem od "LAN Management System". Jest to zestaw
-aplikacji w PHP i Perlu, u³atwiaj±cych zarz±dzanie sieciami
+%description -l pl.UTF-8
+"LMS" jest skrótem od "LAN Management System". Jest to zestaw
+aplikacji w PHP i Perlu, ułatwiających zarządzanie sieciami
 osiedlowymi (popularnie zwanymi Amatorskimi Sieciami Komputerowymi),
-opartych o bazê danych MySQL lub PostgreSQL. G³ówne za³o¿enia to
-uzyskanie jako¶ci us³ug oraz obs³ugi u¿ytkowników na poziomie
+opartych o bazę danych MySQL lub PostgreSQL. Główne założenia to
+uzyskanie jakości usług oraz obsługi użytkowników na poziomie
 providera z prawdziwego zdarzenia. Najbardziej podstawowe cechy LMS
 to:
-- baza danych u¿ytkowników (imiê, nazwisko, adres, numer telefonu,
-  uwagi);
-- baza danych komputerów (adres IP, adres MAC);
+- baza danych użytkowników (imię, nazwisko, adres, numer telefonu,
+  uwagi),
+- baza danych komputerów (adres IP, adres MAC),
 - prowadzenie prostego rachunku operacji finansowych oraz stanu
-  funduszów sieci;
-- ró¿ne taryfy abonamentowe;
-- wysy³anie poczt± elektroniczn± upomnieñ do u¿ytkowników;
-- automatyczne naliczanie op³at miesiêcznych;
-- ró¿ne poziomy dostêpu do funkcji LMS dla administratorów;
-- generowanie regu³ i plików konfiguracyjnych dla ipchains, iptables,
-  dhcpd, oidentd, packet filtra openbsd, wpisów /etc/ethers
-- generowanie praktycznie ka¿dego pliku konfiguracyjnego na podstawie
-  danych w bazie przy u¿yciu prostych szablonów.
+  funduszów sieci,
+- różne taryfy abonamentowe,
+- wysyłanie pocztą elektroniczną upomnień do użytkowników,
+- automatyczne naliczanie opłat miesięcznych,
+- różne poziomy dostępu do funkcji LMS dla administratorów,
+- generowanie reguł i plików konfiguracyjnych dla ipchains, iptables,
+  dhcpd, oidentd, packet filtra openbsd, wpisów /etc/ethers,
+- generowanie praktycznie każdego pliku konfiguracyjnego na podstawie
+  danych w bazie przy użyciu prostych szablonów.
 
 %package scripts
 Summary:       LAN Managment System - scripts
-Summary(pl):   LAN Managment System - skrypty
+Summary(pl.UTF-8):     LAN Managment System - skrypty
 Group:         Networking/Utilities
-Requires:      perl-Net-SMTP-Server
 Requires:      perl-Config-IniFiles
 Requires:      perl-DBI
+Requires:      perl-Net-SMTP-Server
 
 %description scripts
 This package contains scripts to integrate LMS with your system,
 monthly billing, notify users about their debts and cutting off
-customers. Also you can build propably any kind of config file using
+customers. Also you can build probably any kind of config file using
 lms-mgc.
 
-%description scripts -l pl
+%description scripts -l pl.UTF-8
 Ten pakiet zawiera skrypty do zintegrowania LMS z systemem, naliczania
-comiesiêcznych op³at, powiadamiania u¿ytkowników o ich zad³u¿eniu oraz
-ich automagicznego od³±czania. Mo¿esz tak¿e zbudowaæ prawdopodobnie
-ka¿dy typ pliku konfiguracyjnego przy u¿yciu lms-mgc.
+comiesięcznych opłat, powiadamiania użytkowników o ich zadłużeniu oraz
+ich automagicznego odłączania. Możesz także zbudować prawdopodobnie
+każdy typ pliku konfiguracyjnego przy użyciu lms-mgc.
 
 %package sqlpanel
 Summary:       LAN Managment System - sqlpanel module
-Summary(pl):   LAN Managment System - modu³ sqlpanel
+Summary(pl.UTF-8):     LAN Managment System - moduł sqlpanel
 Group:         Networking/Utilities
 Requires:      %{name} = %{version}-%{release}
 
@@ -109,38 +125,61 @@ Requires: %{name} = %{version}-%{release}
 SQL-panel module allows you to execute SQL queries and directly modify
 data.
 
-%description sqlpanel -l pl
-Modu³ 'SQL - panel' daje mo¿liwo¶æ bezpo¶redniego dostêpu do bazy
-danych poprzez zadawanie zapytañ SQL. Wyniki wy¶wietlane s± w formie
+%description sqlpanel -l pl.UTF-8
+Moduł 'SQL - panel' daje możliwość bezpośredniego dostępu do bazy
+danych poprzez zadawanie zapytań SQL. Wyniki wyświetlane są w formie
 tabeli. Ponadto podawany jest czas wykonania zapytania.
 
 %package user
 Summary:       LAN Managment System - simple user interface
-Summary(pl):   LAN Managment System - prosty interfejs u¿ytkownika
+Summary(pl.UTF-8):     LAN Managment System - prosty interfejs użytkownika
 Group:         Networking/Utilities
 Requires:      %{name} = %{version}-%{release}
 
 %description user
 Simple user interface.
 
-%description user -l pl
-Prosty interfejs u¿ytkownika.
+%description user -l pl.UTF-8
+Prosty interfejs użytkownika.
 
 %package lmsd
 Summary:       LAN Managment System - LMS system backend
-Summary(pl):   LAN Managment System - backend systemu LMS
+Summary(pl.UTF-8):     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
 A program to manage the server by creating configuration files based
 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
-wybranych us³ug.
+%description lmsd -l pl.UTF-8
+Program zarządzający serwerem poprzez tworzenie plików
+konfiguracyjnych na podstawie bazy danych LMS-a i restartowanie
+wybranych usług.
+
+%package userpanel
+Summary:       LAN Managment System - Userpanel
+Summary(pl.UTF-8):     System Zarządzania Siecią Lokalną - Panel Użytkownika
+Group:         Networking/Utilities
+Requires:      %{name} = %{version}-%{release}
+
+%description userpanel
+Userpanel is automated virtual customer service, based on LMS and
+using its core features. It enables customers (or it's intended to) to
+do review their payments, change their personal details or computer
+properties, modify subscriptions, submit problems, track their
+requests on Helpdesk and print invoices. It means, it makes a closer
+contact with their ISP.
+
+%description userpanel -l pl.UTF-8
+Userpanel jest opartą na szkielecie LMS (i ściśle z LMS
+współpracującą) implementacją tzw. e-boku. Umożliwia (albo będzie
+umożliwiał) klientom przeglądanie stanu swoich wpłat, zmianę swoich
+danych osobowych, edycję właściwości swoich komputerów, zmianę taryf,
+zgłaszanie błędów oraz awarii do Helpdesku, wydruk faktur oraz
+formularza przelewu.
 
 %prep
 %setup -q -n %{name}
@@ -148,152 +187,161 @@ wybranych us
 %if "%{_lib}" == "lib64"
 %patch1 -p1
 %endif
+%patch2 -p1
+%patch3 -p1
+
+mkdir smarty-plugins
+%{__mv} \
+       lib/Smarty/plugins/block.t.php \
+       lib/Smarty/plugins/function.{bankaccount,gentime,handle,memory,number,size,sum,tip}.php \
+       lib/Smarty/plugins/modifier.{money_format,striphtml,to_words}.php \
+       smarty-plugins
+%{__rm} -r lib/Smarty
+
+# cleanup backups after patching
+find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 %{__rm}
 
 %build
 %if %{with lmsd}
-
 cd daemon
 
-./configure --with-mysql
+./configure --with-mysql %{?with_lmsd_debug:--enable-debug0 --enable-debug1}
 %{__make} \
-       CC='%{__cc}' CFLAGS='%{rpmcflags} -fPIC -DUSE_MYSQL -DLMS_LIB_DIR=\"/usr/lib/lms/\" -I../..'
+       CC='%{__cc}' \
+       CFLAGS='%{rpmcflags} -fPIC -DUSE_MYSQL -DLMS_LIB_DIR=\"%{_libdir}/lms/\" -I../..'
 mv lmsd lmsd-mysql
 
-./configure --with-pgsql
+./configure --with-pgsql %{?with_lmsd_debug:--enable-debug0 --enable-debug1}
 %{__make} lmsd \
        CC='%{__cc}' \
-       CFLAGS='%{rpmcflags} -fPIC -DUSE_PGSQL -DLMS_LIB_DIR=\"/usr/lib/lms/\" -I../..'
+       CFLAGS='%{rpmcflags} -fPIC -DUSE_PGSQL -DLMS_LIB_DIR=\"%{_libdir}/lms/\" -I../..'
 mv lmsd lmsd-pgsql
 
+CFLAGS="%{rpmcflags}" %{__make} -j1 -C modules/parser \
+       CC='%{__cc}'
+
 cd ..
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_sbindir} \
-          $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,httpd} \
-          $RPM_BUILD_ROOT/etc/lms/modules/{dns,ggnofity,nofity} \
-          $RPM_BUILD_ROOT{%{_lmsvar}/{backups,templates_c},/usr/lib/lms} \
-          $RPM_BUILD_ROOT%{_lmsdir}/www/{img,doc,user}
+install -d $RPM_BUILD_ROOT{%{_sbindir},%{_libdir}/%{name},%{_webapps}/%{_webapp}} \
+       $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,lms/modules} \
+       $RPM_BUILD_ROOT%{_smartyplugindir} \
+       $RPM_BUILD_ROOT%{_lmsdir}/{lms,userpanel,www/{doc,user,userpanel/modules}} \
+       $RPM_BUILD_ROOT%{_lmsvar}/{backups,documents,templates_c,userpanel/templates_c}
 
-install *.php $RPM_BUILD_ROOT%{_lmsdir}/www
-install img/* $RPM_BUILD_ROOT%{_lmsdir}/www/img
-cp -r doc/html $RPM_BUILD_ROOT%{_lmsdir}/www/doc
-cp -r lib contrib modules templates sample $RPM_BUILD_ROOT%{_lmsdir}
-install bin/* $RPM_BUILD_ROOT%{_sbindir}
+cp -a *.php img $RPM_BUILD_ROOT%{_lmsdir}/www
+cp -a doc/html $RPM_BUILD_ROOT%{_lmsdir}/www/doc
+cp -a contrib lib modules sample templates $RPM_BUILD_ROOT%{_lmsdir}
+cp -a smarty-plugins/* $RPM_BUILD_ROOT%{_smartyplugindir}
+cp -a bin/* $RPM_BUILD_ROOT%{_sbindir}
 
-install sample/%{name}.ini $RPM_BUILD_ROOT%{_sysconfdir}
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
+%{__mv} $RPM_BUILD_ROOT{%{_lmsdir}/sample/%{name}.ini,%{_sysconfdir}}
+
+install %{SOURCE3} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
+install %{SOURCE4} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
 
 # sqlpanel
-install contrib/sqlpanel/sql.php $RPM_BUILD_ROOT%{_lmsdir}/modules
-install contrib/sqlpanel/*.html $RPM_BUILD_ROOT%{_lmsdir}/templates
+%{__mv} $RPM_BUILD_ROOT%{_lmsdir}/{contrib/sqlpanel/sql*.php,modules}
+%{__mv} $RPM_BUILD_ROOT%{_lmsdir}/{contrib/sqlpanel/*.html,templates}
 
 # user
-cp -r contrib/customer/* $RPM_BUILD_ROOT%{_lmsdir}/www/user
+%{__mv} $RPM_BUILD_ROOT%{_lmsdir}/{contrib/customer/*,www/user}
 
 # daemon
 %if %{with lmsd}
-install daemon/lmsd-* $RPM_BUILD_ROOT%{_sbindir}
-install daemon/modules/*/*.so $RPM_BUILD_ROOT/usr/lib/lms
-cp -r daemon/modules/dns/sample $RPM_BUILD_ROOT%{_sysconfdir}/modules/dns
-cp -r daemon/modules/ggnotify/sample $RPM_BUILD_ROOT%{_sysconfdir}/modules/ggnotify
-cp -r daemon/modules/dns/sample $RPM_BUILD_ROOT%{_sysconfdir}/modules/nofity
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/lmsd
-install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+install daemon/lmsd-*sql $RPM_BUILD_ROOT%{_sbindir}
+install daemon/modules/*/*.so $RPM_BUILD_ROOT%{_libdir}/%{name}
+for module in dns ggnotify notify; do
+       cp -a daemon/modules/$module/sample $RPM_BUILD_ROOT%{_sysconfdir}/modules/$module
+done
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/lmsd
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
 %endif
 
+#userpanel
+cp -a userpanel/{lib,modules,templates} $RPM_BUILD_ROOT%{_lmsdir}/userpanel
+cp -a userpanel/{index.php,style} $RPM_BUILD_ROOT%{_lmsdir}/www/userpanel
+ln -s %{_lmsdir}/www/userpanel/style   $RPM_BUILD_ROOT%{_lmsdir}/userpanel
+ln -s %{_lmsvar}/userpanel/templates_c $RPM_BUILD_ROOT%{_lmsdir}/userpanel
+
+for MODULE in $RPM_BUILD_ROOT%{_lmsdir}/userpanel/modules/*; do
+       MODULE=$(basename $MODULE)
+       mkdir $RPM_BUILD_ROOT%{_lmsdir}/www/userpanel/modules/$MODULE
+       ln -s %{_lmsdir}/userpanel/modules/$MODULE/style \
+               $RPM_BUILD_ROOT%{_lmsdir}/www/userpanel/modules/$MODULE
+done
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post
-if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
-       echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
-       if [ -f /var/lock/subsys/httpd ]; then
-               /usr/sbin/apachectl restart 1>&2
-       fi
-elif [ -d /etc/httpd/httpd.conf ]; then
-       ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
-       if [ -f /var/lock/subsys/httpd ]; then
-               /usr/sbin/apachectl restart 1>&2
-       fi
-fi
-
 %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
-
-%preun
-if [ "$1" = "0" ]; then
-       umask 027
-       if [ -d /etc/httpd/httpd.conf ]; then
-               rm -f /etc/httpd/httpd.conf/99_%{name}.conf
-       else
-               grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
-                       /etc/httpd/httpd.conf.tmp
-               mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
-       fi
-       if [ -f /var/lock/subsys/httpd ]; then
-               /usr/sbin/apachectl restart 1>&2
-       fi
-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
 
-%triggerpostun -- %{name} <= 1.0.4
-echo "WARNING!!!"
-echo "_READ_ and upgrade LMS database:"
-echo "MySQL: /usr/share/doc/%{name}-%{version}/UPGRADE-1.0-1.5.mysql.gz"
-echo "PostgreSQL: /usr/share/doc/%{name}-%{version}/UPGRADE-1.0-1.5.pgsql.gz"
+%triggerin -- apache1 < 1.3.37-3, apache1-base
+%webapp_register apache %{_webapp}
+
+%triggerun -- apache1 < 1.3.37-3, apache1-base
+%webapp_unregister apache %{_webapp}
 
-%triggerpostun -- %{name} <= 1.2.0
-echo "BEWARE:" 
-echo "Automatic upgrade from LMS<= 1.2.0 is NO LONGER SUPPORTED by lms team" 
-echo "You are advised to upgrade it manually" 
-echo 
+%triggerin -- apache-base
+%webapp_register httpd %{_webapp}
+
+%triggerun -- apache-base
+%webapp_unregister httpd %{_webapp}
 
 %files
 %defattr(644,root,root,755)
-%doc doc/{AUTHORS,ChangeLog*,README,UPGRADE*,lms*}
+%doc doc/{AUTHORS,ChangeLog,INSTALL,README*,lms*}
 %dir %{_sysconfdir}
-%attr(640,root,http) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.ini
-%config(noreplace) %verify(not size mtime md5) /etc/httpd/%{name}.conf
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.ini
+%dir %attr(750,root,http) %{_webapps}/%{_webapp}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/apache.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/httpd.conf
+%{_smartyplugindir}/*.php
 #
 %dir %{_lmsvar}
 %attr(770,root,http) %{_lmsvar}/backups
+%attr(770,root,http) %{_lmsvar}/documents
 %attr(770,root,http) %{_lmsvar}/templates_c
 #
 %dir %{_lmsdir}
-%{_lmsdir}/www
-%exclude %{_lmsdir}/www/user
 %{_lmsdir}/lib
 %{_lmsdir}/modules
 %exclude %{_lmsdir}/modules/sql.php
-%{_lmsdir}/contrib
-%{_lmsdir}/sample
-%attr(755,root,root) %{_lmsdir}/sample/traffic_ipt.pl
+%exclude %{_lmsdir}/modules/sqllang.php
 %{_lmsdir}/templates
 %exclude %{_lmsdir}/templates/sql.html
 %exclude %{_lmsdir}/templates/sqlprint.html
+%{_lmsdir}/www
+%exclude %{_lmsdir}/www/user
+%exclude %{_lmsdir}/www/userpanel
+%{_lmsdir}/contrib
+%dir %{_lmsdir}/sample
+%{_lmsdir}/sample/crontab-entry
+%{_lmsdir}/sample/lms-mgc*.ini
+%{_lmsdir}/sample/*.conf
+%{_lmsdir}/sample/*.txt
+%{_lmsdir}/sample/rc.lmsd
+%{_lmsdir}/sample/rc.reminder_1st
+%attr(755,root,root) %{_lmsdir}/sample/traffic_ipt.pl
 
 %files scripts
 %defattr(644,root,root,755)
-%dir %{_sbindir}
-%attr(755,root,root) %{_sbindir}/*
+%attr(755,root,root) %{_sbindir}/lms-*
 
 %files sqlpanel
 %defattr(644,root,root,755)
 %{_lmsdir}/modules/sql.php
+%{_lmsdir}/modules/sqllang.php
 %{_lmsdir}/templates/sql.html
 %{_lmsdir}/templates/sqlprint.html
 
@@ -304,9 +352,27 @@ echo
 %if %{with lmsd}
 %files lmsd
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_sbindir}/lmsd-*
-%attr(755,root,root) /usr/lib/lms/*.so
+%attr(755,root,root) %{_sbindir}/lmsd-*sql
+%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
+
+%files userpanel
+%defattr(644,root,root,755)
+%dir %{_lmsdir}/userpanel
+%{_lmsdir}/userpanel/lib
+%{_lmsdir}/userpanel/modules
+%{_lmsdir}/userpanel/templates
+%{_lmsdir}/userpanel/templates_c
+%{_lmsdir}/userpanel/style
+%dir %{_lmsdir}/www/userpanel
+%{_lmsdir}/www/userpanel/style
+%{_lmsdir}/www/userpanel/index.php
+%dir %{_lmsvar}/userpanel
+%attr(770,root,http) %{_lmsvar}/userpanel/templates_c
This page took 0.098258 seconds and 4 git commands to generate.