SPECS: pykota.spec - separate packages for different storage backe...
baggins
baggins at pld-linux.org
Sat Dec 8 19:27:50 CET 2007
Author: baggins Date: Sat Dec 8 18:27:50 2007 GMT
Module: SPECS Tag: HEAD
---- Log message:
- separate packages for different storage backends
- added openldap-schema-pykota package
---- Files affected:
SPECS:
pykota.spec (1.17 -> 1.18)
---- Diffs:
================================================================
Index: SPECS/pykota.spec
diff -u SPECS/pykota.spec:1.17 SPECS/pykota.spec:1.18
--- SPECS/pykota.spec:1.17 Sat Dec 8 18:40:16 2007
+++ SPECS/pykota.spec Sat Dec 8 19:27:45 2007
@@ -30,18 +30,82 @@
Requires: python-ReportLab
Suggests: net-snmp-utils
Suggests: netatalk
-Suggests: python-ldap
-Suggests: python-MySQLdb >= 1.2
-Suggests: python-PyGreSQL
-Suggests: python-sqlite >= 2.0.5
+Requires: %{name}-storage
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define schemadir /usr/share/openldap/schema
+
%description
Print Quota and Accounting Software Solution.
%description -l pl.UTF-8
Narzędzie do limitowania i rozliczania wydruków.
+%package storage-ldap
+Summary: LDAP storage backend for pykota
+Summary(pl.UTF-8): Backend przechowywania danych w LDAP dla pykoty
+Group: Applications/Printing
+Requires: python-ldap
+Provides: %{name}-storage = %{name}-%{version}-%{release}
+
+%description storage-ldap
+LDAP storage backend for pykota.
+
+%description storage-ldap -l pl.UTF-8
+Backend przechowywania danych w LDAP dla pykoty.
+
+%package storage-mysql
+Summary: MySQL storage backend for pykota
+Summary(pl.UTF-8): Backend przechowywania danych w MySQL dla pykoty
+Group: Applications/Printing
+Requires: python-MySQLdb >= 1.2
+Provides: %{name}-storage = %{name}-%{version}-%{release}
+
+%description storage-mysql
+MySQL storage backend for pykota.
+
+%description storage-mysql -l pl.UTF-8
+Backend przechowywania danych w MySQL dla pykoty.
+
+%package storage-postgres
+Summary: PostgreSQL storage backend for pykota
+Summary(pl.UTF-8): Backend przechowywania danych w PostgreSQL dla pykoty
+Group: Applications/Printing
+Requires: python-PyGreSQL
+Provides: %{name}-storage = %{name}-%{version}-%{release}
+
+%description storage-postgres
+PostgreSQL storage backend for pykota.
+
+%description storage-postgres -l pl.UTF-8
+Backend przechowywania danych w PostgreSQL dla pykoty.
+
+%package storage-sqlite
+Summary: SQLite storage backend for pykota
+Summary(pl.UTF-8): Backend przechowywania danych w SQLite dla pykoty
+Group: Applications/Printing
+Requires: python-sqlite >= 2.0.5
+Provides: %{name}-storage = %{name}-%{version}-%{release}
+
+%description storage-sqlite
+SQLite storage backend for pykota.
+
+%description storage-sqlite -l pl.UTF-8
+Backend przechowywania danych w SQLite dla pykoty.
+
+%package -n openldap-schema-pykota
+Summary: pykota LDAP chema
+Summary(pl.UTF-8): Schemat LDAP dla pykoty
+Group: Networking/Daemons
+Requires(post,postun): sed >= 4.0
+Requires: openldap-servers
+
+%description -n openldap-schema-pykota
+This package contains pykota.schema for openldap.
+
+%description -n openldap-schema-pykota -l pl.UTF-8
+Ten pakiet zawiera schemat pykoty dla openldap-a.
+
%prep
%setup -q
mv -f po/{el_GR,el}
@@ -64,6 +128,7 @@
%install
rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{schemadir}
python setup.py install \
--root=$RPM_BUILD_ROOT \
@@ -71,13 +136,26 @@
%py_postclean
-rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
+install initscripts/ldap/pykota.schema $RPM_BUILD_ROOT%{schemadir}
+
+rm -rf $RPM_BUILD_ROOT%{_datadir}/{doc/%{name},%{name}/{ldap,mysql,postgresql,sqlite}}
%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT
+%post -n openldap-schema-pykota
+# dependant schemas: cosine(uid) inetorgperson(displayName) nis(gidNumber)
+%openldap_schema_register %{schemadir}/pykota.schema -d cosine,inetorgperson,nis
+%service -q ldap restart
+
+%postun -n openldap-schema-pykota
+if [ "$1" = "0" ]; then
+ %openldap_schema_unregister %{schemadir}/pykota.schema
+ %service -q ldap restart
+fi
+
%files -f %{name}.lang
%defattr(644,root,root,755)
%doc CREDITS FAQ LICENSE README SECURITY TODO
@@ -86,7 +164,8 @@
%dir %{py_sitescriptdir}/%{name}
%{py_sitescriptdir}/%{name}/*.py[co]
%dir %{py_sitescriptdir}/%{name}/storages
-%{py_sitescriptdir}/%{name}/storages/*.py[co]
+%{py_sitescriptdir}/%{name}/storages/__init__.py[co]
+%{py_sitescriptdir}/%{name}/storages/sql.py[co]
%dir %{py_sitescriptdir}/%{name}/reporters
%{py_sitescriptdir}/%{name}/reporters/*.py[co]
%dir %{py_sitescriptdir}/%{name}/loggers
@@ -103,8 +182,6 @@
%{_datadir}/%{name}/logos
%dir %{_datadir}/%{name}/cgi-bin
%attr(755,root,root) %{_datadir}/%{name}/cgi-bin/*.cgi
-%{_datadir}/%{name}/ldap
-%{_datadir}/%{name}/postgresql
%{_mandir}/man?/*
%lang(el) %{_mandir}/el/man?/*
@@ -121,12 +198,40 @@
%lang(tr) %{_mandir}/tr/man?/*
%lang(zh_TW) %{_mandir}/zh_TW/man?/*
+%files storage-ldap
+%defattr(644,root,root,755)
+%{py_sitescriptdir}/%{name}/storages/ldap*.py[co]
+
+%files storage-mysql
+%defattr(644,root,root,755)
+%doc initscripts/mysql/*
+%{py_sitescriptdir}/%{name}/storages/mysql*.py[co]
+
+%files storage-postgres
+%defattr(644,root,root,755)
+%doc initscripts/postgresql/*
+%{py_sitescriptdir}/%{name}/storages/pg*.py[co]
+
+%files storage-sqlite
+%defattr(644,root,root,755)
+%doc initscripts/sqlite/*
+%{py_sitescriptdir}/%{name}/storages/sqlite*.py[co]
+
+%files -n openldap-schema-pykota
+%defattr(644,root,root,755)
+%doc initscripts/ldap/{README.ldap,pykota-sample.ldif}
+%{schemadir}/pykota.schema
+
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback at pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.18 2007-12-08 18:27:45 baggins
+- separate packages for different storage backends
+- added openldap-schema-pykota package
+
Revision 1.17 2007-12-08 17:40:16 baggins
- R and S instead of BR
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/pykota.spec?r1=1.17&r2=1.18&f=u
More information about the pld-cvs-commit
mailing list