Sisyphus repository
Last update: 14 october 2019 | SRPMs: 17518 | Visits: 15270346
en ru br
ALT Linux repos
S:0.9.5-alt11
5.0: 0.9.5-alt3
4.1: 0.9.5-alt1
4.0: 0.9.4b-alt1.1
3.0: 0.3.4-alt2

Group :: Office
RPM: ananas

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%undefine __libtoolize
%define libxbase libxbase = 1.8.1
%define beta %nil

Name: ananas
Version: 0.3.4
Release: alt2

Group: Office
Summary: Depot accounting system
Url: http://ananas.linux.ru.net/
License: GPL

Source: %name-%version%beta.tar.bz2
Patch1: ananas-0.3.4.patch

PreReq: MySQL-client, MySQL-server
Requires: %{get_dep libqt3}
Requires: tetex-latex, tetex-dvips, gv
Provides: %libxbase

# Automatically added by buildreq on Tue Apr 27 2004 (-bi)

#BuildRequires: XFree86-libs fontconfig freetype2 gcc-c++ libMySQL-devel libqt3-devel libstdc++-devel qt3-designer tetex-dvips tetex-latex zlib-devel
BuildRequires: XFree86-libs fontconfig freetype2 gcc-c++
BuildRequires: libMySQL-devel libstdc++-devel
BuildRequires: tetex-dvips tetex-latex zlib-devel
BuildRequires: libqt3-devel-cxx = %__gcc_version_base
BuildRequires: libqt3-devel >= 3.0.0
BuildRequires: libqt3-devel >= 3.0.0
# hack for apt in hasher
BuildRequires: libqt3-qsa >= 3.0.0 libqt3-qsa-devel >= 3.0.0

%description
Ananas.Sklad is depot accounting program with many features like
printing reports, filling bills of lading.

Developers
---------------
Andrey P. Paskal <app at linux.ru.net>
Pavel Tereschenko <pavel at petrovich.stud.pu.ru>
Ilych Alexeev <i-l-y-c-h at mail.ru>

Contributors
--------------------
Alexey Novodvorski <aen at logic.ru>
Denis Orlov <denior at intbel.ru>

%prep
%setup -q -n %name-%version%beta
%patch1 -p1
perl -pi -e "s|mkdir|mkdir -p|" ./Makefile

%build
export QTDIR=/usr/lib/qt3
export PATH=$QTDIR/bin:$PATH
export CFLAGS="%optflags" CPPFLAGS="%optflags" CXXFLAGS="%optflags" FLAGS="%optflags"
pushd xbase*
   rm -f config.status config.cache
   %configure
popd
%make_build CFLAGS="%optflags" CPPFLAGS="%optflags" CXXFLAGS="%optflags" FLAGS="%optflags"

%install
mkdir -p %buildroot/%_bindir
mkdir -p %buildroot/%_sysconfdir
mkdir -p %buildroot/%_datadir
mkdir -p %buildroot/%_localstatedir
mkdir -p %buildroot/%_libdir
#
#%%make DESTDIR=%buildroot BUILDROOT=%buildroot install
%make BUILDROOT=%buildroot install
#mv %buildroot/bin/* %buildroot/%_bindir
mv %buildroot/usr/share/%name %buildroot/%_localstatedir/%name
#mv %buildroot/usr/lib/* %buildroot/%_libdir
ln -s ../../%_localstatedir/%name %buildroot/%_datadir/%name

#install menu

mkdir -p $RPM_BUILD_ROOT%_menudir
cat << EOF > $RPM_BUILD_ROOT%_menudir/ananas
?package(%name):command="/bin/sh -c 'cd %_localstatedir/%name/demo; ananas'" \
 needs="x11" \
 section="Applications/Finances" \
 title="Ananas" \
 genericname="Accounting System" \
 longtitle="Depot accounting system"
EOF

%pre
groupadd %name >/dev/null 2>&1 ||:

%post
%post_ldconfig
if [ -z "$DURING_INSTALL" ] ; then
   mysqladmin -u root create ananas_db >/dev/null 2>&1 && cat %_localstatedir/%name/sql/create_*|mysql -u root ananas_db  >/dev/null 2>&1 ||:
   mysqladmin -u root create ananas_demo  >/dev/null 2>&1 ||:
   mysql -u root ananas_demo < %_datadir/%name/sql/demodb.sql 2>&1 ||:
fi
echo -e "\nYou must add users to group \"%name\""
echo -e "to work with Ananas.\n"
%update_menus

%postun
%post_ldconfig
%clean_menus

%files
%doc README* changelog* doc/* todo
#
%_bindir/ananas
%_bindir/ananas-makerep
%_bindir/ananas-report
%_bindir/ananas.sklad
%_datadir/%name
%attr(0775,root,ananas) %dir %_localstatedir/%name
%attr(0775,root,ananas) %_localstatedir/%name/*
%_libdir/libxbase.so.2
%_libdir/libxbase.so.2.8.0
%_sysconfdir/ananasrc
%_menudir/*

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin