3 # summary, desc, more BRs ?, maybe some build fix ?,
4 # conditional build - maybe subpackages with sperate modules ?
7 #%define _modules login logout about clients goods invoices means_of_transport stores archive_invoices
9 Summary: XdeFactor - New Generation
10 Summary(pl): XdeFactor - Nowa Generacja
16 BuildRequires: glib2-devel
17 BuildRequires: postgresql-devel
18 Prereq: /sbin/ldconfig
19 Source0: http://defactor-ng.gnu.pl/XdeFactor-ng_snapshots/%{name}_%{version}.tar.gz
20 Patch0: %{name}-includes.patch
21 Patch1: %{name}-modules-includes.patch
22 URL: http://defactor-ng.gnu.pl/
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Summary: XdeFactor - Login Module
31 Summary(pl): XdeFacotr - Modó³ logowania
33 Requires: %{name} = %{version}
35 %description module-login
37 %description module-login -l pl
40 %setup -q -n xdefactor-ng
46 %{__make} CC="gcc %{rpmcflags}"
50 for i in %{_modules}; do
52 %{__make} CC="gcc %{rpmcflags}"
57 rm -rf $RPM_BUILD_ROOT
58 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/defactor-ng/x/modules/,%{_bindir},%{_libdir}/xdefactor-ng/,%{_datadir}/%{name}}
60 install src/xdefactor-ng $RPM_BUILD_ROOT/%{_bindir}/
61 install conf/logo.jpg $RPM_BUILD_ROOT/%{_datadir}/%{name}/
62 install conf/modules.conf.example $RPM_BUILD_ROOT/%{_datadir}/%{name}/
63 install conf/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/defactor-ng/x/
64 install conf/host.name $RPM_BUILD_ROOT%{_sysconfdir}/defactor-ng/x/
68 for i in %{_modules}; do
71 install $j $RPM_BUILD_ROOT%{_libdir}/xdefactor-ng/
73 install *.conf $RPM_BUILD_ROOT%{_sysconfdir}/defactor-ng/x/modules/
77 # i think it should be in XdeFactor-subpackages in post and postun scripts :)
80 echo %{_libdir}/xdefactor-ng>> %{_sysconfdir}/ld.so.conf
84 cat %{_sysconfdir}/ld.so.conf | grep -v xdefactor-ng > /tmp/ld.so.conf.tmp
85 mv /tmp/ld.so.conf.tmp %{_sysconfdir}/ld.so.conf
90 echo "/modules/Login.conf" >> %{_sysconfdir}/defactor-ng/x/modules.conf
91 echo "libxdef_login.so" >> %{_sysconfdir}/defactor-ng/x/modules.conf
92 chmod 644 %{_sysconfdir}/defactor-ng/x/modules.conf
96 cat %{_sysconfdir}/defactor-ng/x/modules.conf | grep -v -i login > /tmp/xdf-modules.conf.tmp
97 mv /tmp/xdf-modules.conf.tmp %{_sysconfdir}/defactor-ng/x/modules.conf
98 chmod 644 %{_sysconfdir}/defactor-ng/x/modules.conf
102 #rm -rf $RPM_BUILD_ROOT
105 %defattr(644,root,root,755)
107 %attr(755,root,root) %{_bindir}/xdefactor-ng
109 %{_sysconfdir}/defactor-ng/x/*.conf
110 %{_sysconfdir}/defactor-ng/x/host.name
111 #%{_libdir}/xdefactor-ng/
114 %defattr(644,root,root,755)
115 %{_libdir}/xdefactor-ng/libxdef_login.so
116 %{_sysconfdir}/defactor-ng/x/modules/Login.conf