]>
Commit | Line | Data |
---|---|---|
52cc906b | 1 | # |
2 | # TODO: | |
59188ffc | 3 | # - do defactor-ng_sql.spec with automagical script which |
4 | # configure our databases to work with XdeFactor-ng or phpDeFactor-ng | |
5 | # - add user ksiegowy (accounter) to whole distribution ? | |
130eb9dc | 6 | # - wants to use /var/log/xdefactor-ng.log - teach him not to |
c608e131 | 7 | # |
7dc1c38e | 8 | %define _snap 27022004 |
50886b28 | 9 | %define _dbsnap 2004_04_08 |
f9b071b3 | 10 | %define _modules login logout about clients goods invoices means_of_transport stores archive_invoices |
7ce22be4 | 11 | Summary: XdeFactor - New Generation of program to make invoices |
b6708163 | 12 | Summary(pl.UTF-8): XdeFactor - nowa generacja programu do fakturowania |
52cc906b | 13 | Name: XdeFactor-ng |
14 | Version: %{_snap} | |
e3aae3ee | 15 | Release: 4 |
7dc1c38e | 16 | Epoch: 1 |
52cc906b | 17 | License: GPL |
d7890b7a | 18 | Group: Applications |
7dc1c38e | 19 | #Source0: http://defactor-ng.gnu.pl/XdeFactor-ng_snapshots/%{name}_%{version}.tar.gz |
20 | # S XXXource0-md5: 94f7f1abfafbff21183a7d3ee40f9d95 | |
21 | Source0: http://www.xdefactor.netsync.pl/snapshots/%{name}-%{version}.tar.gz | |
22 | # Source0-md5: 3f2d7b129b19cbeb79d5fa197b175f4b | |
0f717ae9 | 23 | Source1: %{name}.conf |
fd4c71ac | 24 | Source2: %{name}-modules.conf |
50886b28 | 25 | Source10: http://duch.mimuw.edu.pl/~hunter/deFactor-ng_sql_%{_dbsnap}.tar.gz |
26 | # Source10-md5: da1bc049b3bbb33d06c364f3b6fefb11 | |
27 | #http://defactor-ng.gnu.pl/deFactor-ng_sql_snapshots/deFactor-ng_sql_%{_dbsnap}.tar.gz | |
52cc906b | 28 | Patch0: %{name}-includes.patch |
29 | Patch1: %{name}-modules-includes.patch | |
7ce22be4 | 30 | Patch2: %{name}-sharedir.patch |
bb8f6495 | 31 | Patch3: %{name}-pic.patch |
52cc906b | 32 | URL: http://defactor-ng.gnu.pl/ |
bb8f6495 JB |
33 | BuildRequires: autoconf >= 2.13 |
34 | BuildRequires: automake | |
35 | BuildRequires: glib2-devel >= 2.0.0 | |
da59d116 | 36 | BuildRequires: gtk+2-devel >= 1:2.0.0 |
4865a132 JB |
37 | BuildRequires: pkgconfig |
38 | BuildRequires: postgresql-devel | |
52cc906b | 39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
41 | %description | |
7ce22be4 | 42 | This is nice program to makeing invoices, service clients, service |
43 | stores, service goods, service means of transport, service archive | |
44 | invoices. It's based on GTK+2 library. | |
d8a74f88 JB |
45 | |
46 | You will need access to PostgreSQL database. Sample structures are | |
99e18662 | 47 | given in the %{name}-database package. |
52cc906b | 48 | |
04014780 JR |
49 | %description -l pl.UTF-8 |
50 | Jest to całkiem przyjemny program do fakturowania, obsługi klientów, | |
51 | obsługi magazynów, zarządzania usługami/towarami, zarządzania środkami | |
52 | transportu, zarządzania fakturami archiwalnymi. Jest on oparty o | |
53 | bibliotekę GTK+2. | |
d8a74f88 | 54 | |
04014780 JR |
55 | Potrzebny jest dostęp do bazy danych PostgreSQL. Przykładowa struktura |
56 | bazy znajduje się w paczce %{name}-database. | |
99e18662 | 57 | |
58 | %package database | |
5c976583 | 59 | Summary: Database specs for XdeFactor |
b6708163 | 60 | Summary(pl.UTF-8): Definicja bazy dla XdeFactora |
99e18662 | 61 | Group: Applications |
d8a74f88 | 62 | Requires: %{name} = %{epoch}:%{version}-%{release} |
99e18662 | 63 | |
d8a74f88 | 64 | %description database |
5c976583 | 65 | Database definition for XdeFactor. |
66 | ||
04014780 | 67 | %description database -l pl.UTF-8 |
d8a74f88 | 68 | Definicja bazy dla XdeFactora. |
52cc906b | 69 | |
70 | %prep | |
99e18662 | 71 | %setup -q -n %{name} -a 10 |
7dc1c38e | 72 | %patch0 -p0 |
73 | #%patch1 -p1 | |
74 | #%patch2 -p1 | |
bb8f6495 | 75 | %patch3 -p1 |
52cc906b | 76 | |
77 | %build | |
7dc1c38e | 78 | %{__aclocal} |
79 | %{__autoconf} | |
80 | %{__autoheader} | |
81 | %{__automake} | |
e91df3ba AG |
82 | %configure \ |
83 | --with-user=nobody \ | |
84 | --with-group=nogroup | |
85 | ||
86 | %{__make} \ | |
130eb9dc | 87 | CC="%{__cc}" |
52cc906b | 88 | |
52cc906b | 89 | %install |
90 | rm -rf $RPM_BUILD_ROOT | |
094e8fd0 | 91 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/defactor-ng/x/modules,%{_bindir},%{_datadir}/%{name}/images,%{_libdir},%{_mandir}/man1/} |
52cc906b | 92 | |
4865a132 JB |
93 | install src/xdefactor-ng $RPM_BUILD_ROOT%{_bindir} |
94 | install conf/logo.jpg $RPM_BUILD_ROOT%{_datadir}/%{name}/images | |
95 | #install conf/modules.conf.example $RPM_BUILD_ROOT%{_datadir}/%{name} | |
96 | install conf/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/defactor-ng/x | |
ea5e7c87 | 97 | #install conf/host.name $RPM_BUILD_ROOT%{_sysconfdir}/defactor-ng/x |
0f717ae9 | 98 | cat %{SOURCE1} >> $RPM_BUILD_ROOT%{_sysconfdir}/defactor-ng/x/xdefactor-ng.conf |
fd4c71ac | 99 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/defactor-ng/x/modules.conf |
100 | ||
99e18662 | 101 | for i in \ |
102 | views.sql \ | |
e91df3ba | 103 | triggers.sql \ |
99e18662 | 104 | struct.sql \ |
bb8f6495 JB |
105 | triggers.sql \ |
106 | user_perms.sql \ | |
e91df3ba AG |
107 | perms.sql.dist \ |
108 | install.sh.dist \ | |
109 | init.sql.dist \ | |
110 | init.sh.dist \ | |
99e18662 | 111 | environment \ |
112 | data.sql \ | |
113 | config_db \ | |
114 | README \ | |
115 | Makefile; | |
116 | ||
79f5303a | 117 | do |
0939d9d2 | 118 | install deFactor-ng_sql/$i $RPM_BUILD_ROOT%{_datadir}/%{name} |
99e18662 | 119 | done |
120 | ||
8a979313 | 121 | cd src/modules |
d389e7c2 | 122 | |
c06e786b | 123 | for i in %{_modules}; do |
bb8f6495 JB |
124 | cd $i |
125 | for j in *.so; do | |
126 | install $j $RPM_BUILD_ROOT%{_libdir} | |
127 | done | |
128 | install *.conf $RPM_BUILD_ROOT%{_sysconfdir}/defactor-ng/x/modules | |
129 | cd .. | |
8a979313 | 130 | done |
131 | ||
e3aae3ee AG |
132 | cd ../.. |
133 | ||
134 | install doc/xdefactor-ng.1 $RPM_BUILD_ROOT%{_mandir}/man1/ | |
094e8fd0 | 135 | |
52cc906b | 136 | %clean |
c608e131 | 137 | rm -rf $RPM_BUILD_ROOT |
52cc906b | 138 | |
4865a132 JB |
139 | %post -p /sbin/ldconfig |
140 | %postun -p /sbin/ldconfig | |
141 | ||
52cc906b | 142 | %files |
143 | %defattr(644,root,root,755) | |
094e8fd0 | 144 | %doc AUTHORS README INSTALL TODO conf/modules.conf.example |
8a979313 | 145 | %attr(755,root,root) %{_bindir}/xdefactor-ng |
4865a132 JB |
146 | %attr(755,root,root) %{_libdir}/libxdef_*.so |
147 | %dir %{_datadir}/%{name} | |
148 | %dir %{_datadir}/%{name}/images | |
7ce22be4 | 149 | %{_datadir}/%{name}/images/logo.jpg |
4865a132 JB |
150 | %dir %{_sysconfdir}/defactor-ng |
151 | %dir %{_sysconfdir}/defactor-ng/x | |
79f5303a | 152 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/defactor-ng/x/*.conf |
ea5e7c87 | 153 | #%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/defactor-ng/x/host.name |
4865a132 | 154 | %dir %{_sysconfdir}/defactor-ng/x/modules |
79f5303a | 155 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/defactor-ng/x/modules/*.conf |
094e8fd0 | 156 | %{_mandir}/man1/* |
99e18662 | 157 | |
158 | %files database | |
bb8f6495 | 159 | %defattr(644,root,root,755) |
d8a74f88 JB |
160 | %{_datadir}/%{name}/* |
161 | %exclude %{_datadir}/%{name}/images |