]> git.pld-linux.org Git - packages/XdeFactor-ng.git/blobdiff - XdeFactor-ng.spec
- cosmetics
[packages/XdeFactor-ng.git] / XdeFactor-ng.spec
index e7d2c3cd34598cd44e9bc38278d1e192d9b6c0cc..05b69d007255ebd5d8448d7a30e0eae57fa372e6 100644 (file)
@@ -4,15 +4,18 @@
 # conditional build - maybe subpackages with sperate modules ?
 # 
 %define                _snap   20030212
+#%define               _modules login logout about clients goods invoices means_of_transport stores archive_invoices
+%define                _modules login
 Summary:       XdeFactor - New Generation
 Summary(pl):   XdeFactor - Nowa Generacja
 Name:          XdeFactor-ng
 Version:       %{_snap}
 Release:       0.1
 License:       GPL
-Group:         Bzium
+Group:         Applications
 BuildRequires: glib2-devel
 BuildRequires: postgresql-devel
+Prereq:        /sbin/ldconfig
 Source0:       http://defactor-ng.gnu.pl/XdeFactor-ng_snapshots/%{name}_%{version}.tar.gz
 Patch0:                %{name}-includes.patch
 Patch1:                %{name}-modules-includes.patch
@@ -23,6 +26,16 @@ BuildRoot:   %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description -l pl
 
+%package module-login
+Summary:       XdeFactor - Login Module
+Summary(pl):   XdeFacotr - Modó³ logowania
+Group:         Applications
+Requires:      %{name} = %{version}
+
+%description module-login
+
+%description module-login -l pl
+
 %prep
 %setup -q -n xdefactor-ng
 %patch0 -p1
@@ -32,12 +45,9 @@ BuildRoot:   %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 cd src
 %{__make} CC="gcc %{rpmcflags}"
 
-MODULES="login logout about clients goods invoices means_of_transport stores \
-        archive_invoices"
-
 cd modules
 
-for i in $MODULES; do
+for i in %{_modules}; do
  cd $i
  %{__make} CC="gcc %{rpmcflags}"
  cd ..
@@ -54,11 +64,11 @@ install conf/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/defactor-ng/x/
 install conf/host.name $RPM_BUILD_ROOT%{_sysconfdir}/defactor-ng/x/
 
 cd src/modules
-for i in $MODULES; do
+        
+for i in %{_modules}; do
  cd $i
-for i in *.so; do
-  install $i $RPM_BUILD_ROOT%{_libdir}/xdefactor-ng/
-  echo "$i" >> $RPM_BUILD_ROOT%{_sysconfdir}/defactor-ng/x/modules.conf
+for j in *.so; do
+  install $j $RPM_BUILD_ROOT%{_libdir}/xdefactor-ng/
  done
  install *.conf $RPM_BUILD_ROOT%{_sysconfdir}/defactor-ng/x/modules/
  cd ..
@@ -66,6 +76,28 @@ done
 
 # i think it should be in XdeFactor-subpackages in post and postun scripts :)
 
+%post   
+echo %{_libdir}/xdefactor-ng>> %{_sysconfdir}/ld.so.conf
+/sbin/ldconfig
+
+%postun
+cat %{_sysconfdir}/ld.so.conf | grep -v xdefactor-ng > /tmp/ld.so.conf.tmp
+mv /tmp/ld.so.conf.tmp %{_sysconfdir}/ld.so.conf
+
+/sbin/ldconfig
+
+%post module-login
+echo "/modules/Login.conf" >> %{_sysconfdir}/defactor-ng/x/modules.conf
+echo "libxdef_login.so" >> %{_sysconfdir}/defactor-ng/x/modules.conf
+chmod 644 %{_sysconfdir}/defactor-ng/x/modules.conf
+/sbin/ldconfig
+
+%postun module-login
+cat %{_sysconfdir}/defactor-ng/x/modules.conf | grep -v -i login > /tmp/xdf-modules.conf.tmp
+mv /tmp/xdf-modules.conf.tmp %{_sysconfdir}/defactor-ng/x/modules.conf
+chmod 644 %{_sysconfdir}/defactor-ng/x/modules.conf
+/sbin/ldconfig
+
 %clean
 #rm -rf $RPM_BUILD_ROOT
 
@@ -74,5 +106,11 @@ done
 %doc AUTHORS README
 %attr(755,root,root) %{_bindir}/xdefactor-ng
 %{_datadir}/%{name}/
-%{_sysconfdir}/defactor-ng/x/
-%{_libdir}/xdefactor-ng/
+%{_sysconfdir}/defactor-ng/x/*.conf
+%{_sysconfdir}/defactor-ng/x/host.name
+#%{_libdir}/xdefactor-ng/
+
+%files module-login
+%defattr(644,root,root,755)
+%{_libdir}/xdefactor-ng/libxdef_login.so
+%{_sysconfdir}/defactor-ng/x/modules/Login.conf
This page took 0.105513 seconds and 4 git commands to generate.