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
8 Summary: XdeFactor - New Generation
9 Summary(pl): XdeFactor - Nowa Generacja
15 BuildRequires: glib2-devel
16 BuildRequires: postgresql-devel
17 Prereq: /sbin/ldconfig
18 Source0: http://defactor-ng.gnu.pl/XdeFactor-ng_snapshots/%{name}_%{version}.tar.gz
19 Patch0: %{name}-includes.patch
20 Patch1: %{name}-modules-includes.patch
21 URL: http://defactor-ng.gnu.pl/
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %setup -q -n xdefactor-ng
35 %{__make} CC="gcc %{rpmcflags}"
39 for i in %{_modules}; do
41 %{__make} CC="gcc %{rpmcflags}"
46 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/defactor-ng/x/modules/,%{_bindir},%{_libdir}/xdefactor-ng/,%{_datadir}/%{name}}
49 install src/xdefactor-ng $RPM_BUILD_ROOT/%{_bindir}/
50 install conf/logo.jpg $RPM_BUILD_ROOT/%{_datadir}/%{name}/
51 install conf/modules.conf.example $RPM_BUILD_ROOT/%{_datadir}/%{name}/
52 install conf/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/defactor-ng/x/
53 install conf/host.name $RPM_BUILD_ROOT%{_sysconfdir}/defactor-ng/x/
57 for i in %{_modules}; do
60 install $j $RPM_BUILD_ROOT%{_libdir}/xdefactor-ng/
61 echo "$j" >> $RPM_BUILD_ROOT%{_sysconfdir}/defactor-ng/x/modules.conf
63 install *.conf $RPM_BUILD_ROOT%{_sysconfdir}/defactor-ng/x/modules/
67 # i think it should be in XdeFactor-subpackages in post and postun scripts :)
70 echo %{_libdir}/xdefactor-ng>> %{_sysconfdir}/ld.so.conf
74 cat %{_sysconfdir}/ld.so.conf | grep -v xdefactor-ng > /tmp/ld.so.conf.tmp
75 mv /tmp/ld.so.conf.tmp %{_sysconfdir}/ld.so.conf
78 #rm -rf $RPM_BUILD_ROOT
81 %defattr(644,root,root,755)
83 %attr(755,root,root) %{_bindir}/xdefactor-ng
85 %{_sysconfdir}/defactor-ng/x/
86 %{_libdir}/xdefactor-ng/