-
Notifications
You must be signed in to change notification settings - Fork 10
/
ananas.spec.alt
217 lines (168 loc) · 8.25 KB
/
ananas.spec.alt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
# ananas project
# Spec file for building single rpm package of Ananas for ALT Linux
# $Id: ananas.spec.alt,v 1.3 2007/12/30 14:34:59 app Exp $
# $Name: $
#
%define ShortName ananas
%define _qtdir %(echo $QTDIR)
Name: ananas
Version: 0.9.5
Release: alt2
Buildroot: %{_tmppath}/%{name}-%{version}-root
Summary: Runtime and development environment of Finance Applications
Summary(ru_RU.UTF8): Среда разработки и исполнения прикладных решений автоматизации оперативного, бухгалтерского и других видов учета.
License: GPL
Url: http://ananas.lrn.ru/
Vendor: Project Ananas
Group(ru): Офис
Group: Office
Source: %name-%version.tar.bz2
Requires: MySQL-server >= 4.1
Requires: MySQL-client >= 4.1
Requires: libqt3 >= 3.2
Requires: libqt3-qsa >= 3.2
Requires: zip
Requires: unzip
BuildRequires: gcc-c++ libstdc++-devel
BuildRequires: libMySQL-devel
BuildRequires: libqt3-devel
BuildRequires: libqt3-qsa-devel
%description -l ru_RU.UTF8
Платформа Ананас предназначена для автомматизации малых и средних предприятий.
Обеспечивает автоматизацию ведения оперативного и бухгалтерского учета.
Платформа позволяет создавать приложения, поддерживающие многопользовательский
режим работы, сопровождается документацией на русском языке
имеет русифицированный графический интерфейс пользователя. Для ее
использования необходимо иметь установленную систему X Window System,
графическую среду KDE и сервер баз данных с поддержкой транзакций MySQL.
Пакет ananas необходимо установить, если вы собираетесь использовать
прикладное решение на платформе Ананас.
Разработчики
---------------
Валерий Гражданкин <vg at leaderit dot ru>
Андрей Паскаль <app at lrn dot ru>
Андрей Стрельников <avsone at yandex dot ru>
Павел Миколайчук <Pashik at bk dot ru>
Александр Ковалёв <cibfx at bk dot ru>
Григорий Панов <gr1313 at mail dot ru>
%description
Ananas is an Accounting Application Framework for Small Businesses.
Developers
---------------
Valery Grazhdankin <vg at leaderit dot ru>
Andrey Paskal <app at lrn dot ru>
Andrey Strelnikov <avsone at yandex dot ru>
Pavel Mikolaychuk <Pashik at bk dot ru>
Alexander Kovalyov <cibfx at bk dot ru>
Grigory Panov <gr1313 at mail dot ru>
%prep
%setup
%build
export PATH=${PATH}:$QTDIR/bin
./configure
make
make tr
%install
export PATH=${PATH}:$QTDIR/bin
make install INSTALL_ROOT="$RPM_BUILD_ROOT" LIBDIR=%_libdir BINDIR=%_bindir DOCDIR=%_docdir/%name-%version INCLUDEDIR=%_includedir/ananas
%__mkdir_p %buildroot%_sysconfdir/ananas
%__mkdir_p %buildroot%_datadir/ananas/translations
%__mkdir_p %buildroot%_datadir/ananas/templates
%__mkdir_p %buildroot%_datadir/ananas/inventory
%__mkdir_p %buildroot%_datadir/pixmaps
%__mkdir_p %buildroot%_menudir
%__mkdir_p %buildroot%_datadir/applications/kde
#clear debug info
strip %buildroot%_bindir/ananas
strip %buildroot%_bindir/ananas-designer
strip %buildroot%_libdir/libananas.so*
strip %buildroot%_libdir/ananas/qt3plugins/designer/libananasplugin.so
strip %buildroot%_libdir/ananas/qt3plugins/sqldrivers/libqsqlmysqlu.so
strip %buildroot%_libdir/ananas/*.so
mv %buildroot%_libdir/ananas/qt3plugins/designer/libananasplugin.so %buildroot%_libdir/
ln -fs ../../../libananasplugin.so %buildroot%_libdir/ananas/qt3plugins/designer/libananasplugin.so
cp -f %_builddir/%name-%version/translations/*.qm %buildroot%_datadir/ananas/translations
cp -f %_builddir/%name-%version/src/designer/templates/*.* %buildroot%_datadir/ananas/templates
cp -f %_builddir/%name-%version/applications/inventory/inventory.cfg %buildroot%_sysconfdir/ananas/
cp -f %_builddir/%name-%version/applications/inventory/inventory.rc %buildroot%_sysconfdir/ananas/
cp -f %_builddir/%name-%version/applications/inventory/inventory.sql %buildroot%_datadir/ananas/inventory
cp -f %_builddir/%name-%version/applications/inventory/inventory-demo.cfg %buildroot%_sysconfdir/ananas/
cp -f %_builddir/%name-%version/applications/inventory/inventory-demo.rc %buildroot%_sysconfdir/ananas/
cp -f %_builddir/%name-%version/applications/inventory/inventory-demo.sql %buildroot%_datadir/ananas/inventory
cp -f %_builddir/%name-%version/applications/inventory/inventory_pgsql.sql %buildroot%_datadir/ananas/inventory
cp -f %_builddir/%name-%version/applications/inventory/inventory_grouprc %buildroot%_sysconfdir/ananas
cp -f %_builddir/%name-%version/applications/inventory/templ_*.odt %buildroot%_datadir/ananas/inventory
cp -f %_builddir/%name-%version/applications/inventory/templ_*.ods %buildroot%_datadir/ananas/inventory
cp -f %_builddir/%name-%version/build/kde/images/*.png %buildroot%_datadir/pixmaps/
cp -f %_builddir/%name-%version/build/kde/ananas %buildroot/usr/lib/menu
cp -f %_builddir/%name-%version/build/kde/ananas-designer %buildroot/usr/lib/menu
%post
#starts mysql server
[ -e /etc/init.d/mysqld ] && /etc/init.d/mysqld status|grep -v pid > /dev/null && /etc/init.d/mysqld start > /dev/null || :
#creates system base for mysql
mysqlshow -u root| grep ananas_system > /dev/null || mysqladmin -u root create ananas_system || :
#touch %buildroot%_sysconfdir/ananas/groupsrc
rm -f %_datadir/applications/kde/ananas.desktop
rm -f %_datadir/applications/kde/ananas-designer.desktop
%update_menus
##%post -n ananas-inventory
#cat %_datadir/ananas/inventory/groupsrc >> %_sysconfdir/ananas/groupsrc
#starts mysql server
[ -e /etc/init.d/mysqld ] && /etc/init.d/mysqld status|grep -v pid > /dev/null && /etc/init.d/mysqld start > /dev/null || :
#creates databases
mysql -u root -e "create database ananas_inventory character set utf8" > /dev/null 2>&1 && mysql -u root ananas_inventory < %_datadir/ananas/inventory/inventory.sql || :
mysql -u root -e "create database ananas_inventory_demo character set utf8" > /dev/null 2>&1 && mysql -u root ananas_inventory_demo < %_datadir/ananas/inventory/inventory-demo.sql || :
%postun
%clean_menus
rm -f %_datadir/ananas/translations/*.qm
rm -f %_datadir/ananas/templates/*.*
rmdir --ignore-fail-on-non-empty %_datadir/ananas/translations
rmdir --ignore-fail-on-non-empty %_datadir/ananas/templates
rmdir --ignore-fail-on-non-empty %_datadir/ananas
##%postun -n ananas-extensions
rmdir --ignore-fail-on-non-empty %_libdir/ananas
rmdir --ignore-fail-on-non-empty %_datadir/ananas
##%postun -n ananas-inventory
rm -f %_sysconfdir/ananas/inventory.*
rm -f %_sysconfdir/ananas/inventory-demo.*
rm -f %_sysconfdir/ananas/inventory_grouprc
rmdir --ignore-fail-on-non-empty %_sysconfdir/ananas
rm -f %_datadir/ananas/inventory/templ_*.odt
rm -f %_datadir/ananas/inventory/templ_*.ods
rmdir --ignore-fail-on-non-empty %_datadir/ananas/inventory
rmdir --ignore-fail-on-non-empty %_datadir/ananas
%clean
%files
%_bindir/ananas
%_bindir/ananas-designer
%_libdir/libananas.so*
%_libdir/libananasplugin.so
%_libdir/ananas/qt3plugins/designer/libananasplugin.so
%_libdir/ananas/qt3plugins/sqldrivers/libqsqlmysqlu.so
%_docdir/%name-%version/ananas-*.sxw
%_datadir/ananas/translations/*.qm
%_datadir/ananas/templates/*.*
%_datadir/pixmaps/*.png
# files menu for ALT
/usr/lib/menu/ananas
/usr/lib/menu/ananas-designer
# files desktop for Fedora
##%_datadir/applications/kde/ananas.desktop
##%_datadir/applications/kde/ananas-designer.desktop
##%files -n ananas-devel
%_includedir/ananas/*.h
%_docdir/%name-%version/*.tex
##%files -n ananas-inventory
%_sysconfdir/ananas/inventory.*
%_sysconfdir/ananas/inventory-demo.*
%_datadir/ananas/inventory/inventory.sql
%_datadir/ananas/inventory/inventory-demo.sql
%_datadir/ananas/inventory/inventory_pgsql.sql
%_datadir/ananas/inventory/templ_*.odt
%_datadir/ananas/inventory/templ_*.ods
%_sysconfdir/ananas/inventory_grouprc
##%files -n ananas-extensions
%_libdir/ananas/*.so
%changelog
* Sun Dec 30 2007 Andrey Paskal 0.9.5
+ Please look at ChangeLog file of Ananas Project