swt2c / rpms / EekBoek

Forked from rpms/EekBoek 5 years ago
Clone
c0f0847
# -*- rpm-spec -*-
c0f0847
c0f0847
################ Build Options ###################
c0f0847
%define dbtests 1
c0f0847
%{?_with_dbtests:    %{expand: %%global dbtests 1}}
c0f0847
%{?_without_dbtests: %{expand: %%global dbtests 0}}
c0f0847
################ End Build Options ################
c0f0847
c0f0847
Name: EekBoek
c0f0847
Summary: Bookkeeping software for small and medium-size businesses
c0f0847
License: GPL+ or Artistic
c0f0847
Group: Applications/Productivity
b64c7d9
Version: 2.00.04
d030b7e
Release: 1%{?dist}
c0f0847
Source: http://www.eekboek.nl/dl/%{name}-%{version}.tar.gz
c0f0847
URL: http://www.eekboek.nl
c0f0847
BuildRoot: %{_tmppath}/rpm-buildroot-%{name}-%{version}-%{release}
c0f0847
c0f0847
# The package name is CamelCased. However, for convenience some
c0f0847
# of its data is located in files and directories that are all
c0f0847
# lowercase. See the %%install section.
c0f0847
%global lcname eekboek
c0f0847
c0f0847
# It's all plain perl, nothing architecture dependent.
c0f0847
BuildArch: noarch
c0f0847
c0f0847
# This package would provide many (perl) modules, but these are
c0f0847
# note intended for general use.
c0f0847
AutoReqProv: 0
c0f0847
c0f0847
Requires: perl >= 5.8
c0f0847
Requires: perl(Archive::Zip)
d29627d
Requires: perl(HTML::Parser)
c0f0847
Requires: perl(Term::ReadLine)
c0f0847
Requires: perl(Term::ReadLine::Gnu)
c0f0847
Requires: perl(DBI) >= 1.40
c0f0847
Requires: perl(DBD::SQLite) >= 1.12
d29627d
Requires: perl(Carp::Assert) >= 0.20
c0f0847
c0f0847
BuildRequires: perl >= 5.8.8
d29627d
BuildRequires: perl(Module::Build) >= 0.32
c0f0847
BuildRequires: perl(IPC::Run3)
d29627d
BuildRequires: perl(Archive::Zip)
d29627d
BuildRequires: perl(HTML::Parser)
c0f0847
BuildRequires: perl(Term::ReadLine)
c0f0847
BuildRequires: perl(Term::ReadLine::Gnu)
c0f0847
BuildRequires: perl(DBI) >= 1.40
c0f0847
BuildRequires: perl(DBD::SQLite) >= 1.12
d29627d
BuildRequires: perl(Carp::Assert) >= 0.20
c0f0847
BuildRequires: perl(Test::More)
d29627d
BuildRequires: desktop-file-utils
c0f0847
BuildRequires: zip
c0f0847
d29627d
Obsoletes: %{name}-core < 2.00.01
d29627d
Obsoletes: %{name}-contrib < 2.00.01
d29627d
Conflicts: %{name}-core < 2.00.01
d29627d
c0f0847
# For symmetry.
c0f0847
%global __zip   /usr/bin/zip
d29627d
%global __rmdir /bin/rmdir
c0f0847
%global __find  /usr/bin/find
c0f0847
c0f0847
%description
c0f0847
EekBoek is a bookkeeping package for small and medium-size businesses.
c0f0847
Unlike other accounting software, EekBoek has both a command-line
c0f0847
interface (CLI) and a graphical user-interface (GUI, currently under
c0f0847
development and not included in this package). Furthermore, it has a
c0f0847
complete Perl API to create your own custom applications. EekBoek is
c0f0847
designed for the Dutch/European market and currently available in
c0f0847
Dutch only. An English translation is in the works (help appreciated).
c0f0847
c0f0847
EekBoek can make use of several database systems for its storage.
c0f0847
Support for the SQLite database is included.
d29627d
d29627d
For GUI support, install %{name}-gui.
d29627d
c0f0847
For production use, you are invited to install the %{name}-db-postgresql
c0f0847
database package.
c0f0847
d29627d
%package gui
d29627d
d29627d
Summary: %{name} graphical user interface
d29627d
Group: Applications/Productivity
d29627d
AutoReqProv: 0
d29627d
d29627d
Requires: %{name} = %{version}-%{release}
d29627d
Requires: perl(Wx) >= 0.89
d29627d
Requires: perl(Wx::Perl::ProcessStream) >= 0.11
d29627d
Requires: wxGTK >= 2.8.8
d29627d
Requires: gettext
d29627d
d29627d
%description gui
d29627d
This package contains the wxWidgets (GUI) extension for %{name}.
d29627d
c0f0847
%package db-postgresql
c0f0847
c0f0847
# This package only contains the necessary module(s) for EekBoek
c0f0847
# to use the PostgreSQL database.
d030b7e
# Installing this package will pull in the core package and
d030b7e
# the Perl PostgreSQL modules.
c0f0847
# No %%doc required.
c0f0847
c0f0847
Summary: PostgreSQL database driver for %{name}
c0f0847
Group: Applications/Productivity
c0f0847
AutoReqProv: 0
c0f0847
Requires: %{name} = %{version}-%{release}
c0f0847
Requires: perl(DBD::Pg) >= 1.41
c0f0847
c0f0847
%description db-postgresql
c0f0847
EekBoek can make use of several database systems for its storage.
c0f0847
This package contains the PostgreSQL database driver for %{name}.
c0f0847
c0f0847
%prep
c0f0847
%setup -q
c0f0847
d29627d
chmod 0664 MANIFEST
c0f0847
c0f0847
# Remove some build helper sources since we BuildRequire them.
c0f0847
%{__rm} -fr inc/IPC inc/Module
c0f0847
%{__perl} -ni~ -e 'print unless m;^inc/(Module|IPC)/;;' MANIFEST
c0f0847
d29627d
# Remove some library modules since we Require them.
d29627d
%{__rm} -fr lib/EB/CPAN/Carp
d030b7e
%{__rm} -fr lib/EB/CPAN/File
d29627d
%{__rm} -fr lib/EB/CPAN/Wx
d29627d
%{__perl} -ni~ -e 'print unless m;^lib/EB/CPAN/;;' MANIFEST
c0f0847
c0f0847
%build
c0f0847
%{__perl} Build.PL
c0f0847
%{__perl} Build
c0f0847
c0f0847
# Move some files into better places.
c0f0847
mv blib/lib/EB/examples .
c0f0847
( cd examples;
c0f0847
  %{__mv} ../eekboek-mode.el .;
c0f0847
  %{__rm} -f ../blib/lib/EB/schema/sampledb.ebz;
d29627d
  ( echo "Dataset sampledb.ebz aangemaakt door rpmbuild EekBoek %{version}"
d29627d
    echo "Omschrijving: EekBoek voorbeeldadministratie" ) |
d29627d
  %{__zip} -qz ../blib/lib/EB/schema/sampledb.ebz *.eb schema.dat )
c0f0847
c0f0847
%install
c0f0847
%{__rm} -rf %{buildroot}
c0f0847
c0f0847
# Short names for our libraries.
c0f0847
%global ebconf  %{_sysconfdir}/%{lcname}
c0f0847
%global ebshare %{_datadir}/%{name}-%{version}
c0f0847
c0f0847
%{__mkdir_p} %{buildroot}%{ebconf}
c0f0847
%{__mkdir_p} %{buildroot}%{ebshare}/lib
c0f0847
%{__mkdir_p} %{buildroot}%{_bindir}
c0f0847
c0f0847
# Install the default, system-wide config file.
c0f0847
%{__install} -p -m 0644 examples/%{lcname}.conf %{buildroot}%{ebconf}/%{lcname}.conf
c0f0847
d29627d
# Install locales.
d29627d
for lang in blib/lib/EB/mo/*
d29627d
do
d29627d
  l=`basename ${lang}`
d29627d
  %{__mkdir_p} %{buildroot}%{_datadir}/locale/${l}/LC_MESSAGES
d29627d
  %{__mv} blib/lib/EB/mo/${l}/* %{buildroot}%{_datadir}/locale/${l}/LC_MESSAGES
d29627d
  %{__rmdir} blib/lib/EB/mo/${l}
d29627d
done
d29627d
%{__rmdir} blib/lib/EB/mo
d29627d
c0f0847
# Create lib dirs and copy files.
c0f0847
%{__find} blib/lib -type d -printf "%{__mkdir} %{buildroot}%{ebshare}/lib/%%P\n" | sh -x
c0f0847
%{__find} blib/lib ! -type d -printf "%{__install} -p -m 0644 %p %{buildroot}%{ebshare}/lib/%%P\n" | sh -x
c0f0847
d29627d
for script in ebshell ebwxshell
d29627d
do
d29627d
d29627d
  # Create the main scripts.
d29627d
  echo "#!%{__perl}" > %{buildroot}%{_bindir}/${script}
d29627d
  %{__sed} -s "s;# use lib qw(EekBoekLibrary;use lib qw(%{ebshare}/lib;" \
d29627d
    < script/${script} >> %{buildroot}%{_bindir}/${script}
d29627d
  %{__chmod} 0755 %{buildroot}%{_bindir}/${script}
d29627d
d29627d
  # And its manual page.
d29627d
  %{__mkdir_p} %{buildroot}%{_mandir}/man1
d29627d
  pod2man blib/script/${script} > %{buildroot}%{_mandir}/man1/${script}.1
d29627d
d29627d
  # And the localisations.
d29627d
  # %find_lang ${script}
d29627d
d29627d
done
c0f0847
d29627d
# Handle localisations separately since we are not complete yet.
d29627d
for script in ebwxshell
d29627d
do
d29627d
  %find_lang ${script}
d29627d
done
d29627d
d29627d
# Desktop file, icons, ...
d29627d
%{__mkdir_p} %{buildroot}%{_datadir}/pixmaps
d29627d
%{__install} -p -m 0664 lib/EB/Wx/icons/ebicon.png %{buildroot}%{_datadir}/pixmaps/
d29627d
for script in ebwxshell
d29627d
do
d29627d
  desktop-file-install --delete-original \
d29627d
    --dir=%{buildroot}%{_datadir}/applications ${script}.desktop
d29627d
  desktop-file-validate %{buildroot}/%{_datadir}/applications/${script}.desktop
d29627d
done
c0f0847
c0f0847
# End of install section.
c0f0847
c0f0847
%check
c0f0847
%if %{dbtests}
c0f0847
%{__perl} Build test
c0f0847
%else
c0f0847
%{__perl} Build test --skipdbtests
c0f0847
%endif
c0f0847
c0f0847
%clean
c0f0847
%{__rm} -rf %{buildroot}
c0f0847
c0f0847
%files
c0f0847
%defattr(-,root,root,-)
c0f0847
%doc CHANGES README examples/ doc/html/ TODO
c0f0847
%dir %{_sysconfdir}/%{lcname}
c0f0847
%config(noreplace) %{_sysconfdir}/%{lcname}/%{lcname}.conf
c0f0847
%{ebshare}/
c0f0847
%exclude %{ebshare}/lib/EB/DB/Postgres.pm
d29627d
%exclude %{ebshare}/lib/EB/Wx
c0f0847
%{_bindir}/ebshell
d29627d
%{_mandir}/man1/ebshell*
d29627d
d29627d
%files -f ebwxshell.lang gui
d29627d
%defattr(-,root,root,-)
d29627d
%doc README.gui
d29627d
%{ebshare}/lib/EB/Wx
d29627d
%{_bindir}/ebwxshell
d29627d
%{_mandir}/man1/ebwxshell*
d29627d
%{_datadir}/applications/ebwxshell.desktop
d29627d
%{_datadir}/pixmaps/ebicon.png
c0f0847
c0f0847
%files db-postgresql
c0f0847
%defattr(-,root,root,-)
c0f0847
%doc README.postgres
c0f0847
%{ebshare}/lib/EB/DB/Postgres.pm
c0f0847
c0f0847
%changelog
b64c7d9
* Tue Mar 15 2012 Johan Vromans <jvromans@squirrel.nl> - 2.00.04-1
b64c7d9
- Upgrade to upstream 2.00.04.
b64c7d9
d030b7e
* Tue Mar 22 2011 Johan Vromans <jvromans@squirrel.nl> - 2.00.03-1
d030b7e
- Upgrade to upstream 2.00.03.
d030b7e
72727b4
* Tue Feb 22 2011 Karsten Hopp <karsten@redhat.com> 2.00.02-3
72727b4
- bump release and rebuild for PPC
72727b4
d83bb87
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.00.02-2
d83bb87
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
d83bb87
08d0029
* Thu May 06 2010 Johan Vromans <jvromans@squirrel.nl> - 2.00.02-1
08d0029
- Upgrade to upstream 2.00.02.
08d0029
d29627d
* Mon Mar 29 2010 Johan Vromans <jvromans@squirrel.nl> - 2.00.01-3
d29627d
- More Obsoletes.
d29627d
d29627d
* Mon Mar 29 2010 Johan Vromans <jvromans@squirrel.nl> - 2.00.01-2
d29627d
- Fix duplicate %%description.
d29627d
- Fix BuildRequires and Obsoletes.
d29627d
d29627d
* Sun Mar 28 2010 Johan Vromans <jvromans@squirrel.nl> - 2.00.01-1
d29627d
- Upgrade to upstream 2.00.01.
d29627d
d29627d
* Sat Mar 27 2010 Johan Vromans <jvromans@squirrel.nl> - 2.00.00-2
d29627d
- Repackage according to user concensus.
d29627d
d29627d
* Tue Mar 23 2010 Johan Vromans <jvromans@squirrel.nl> - 2.00.00-1
d29627d
- Upgrade to upstream 2.00.00.
d29627d
d29627d
* Mon Feb 08 2010 Johan Vromans <jvromans@squirrel.nl> - 1.05.20-1
d29627d
- Upgrade to upstream 1.05.20.
d29627d
d29627d
* Sat Jan 16 2010 Johan Vromans <jvromans@squirrel.nl> - 1.05.16-1
d29627d
- Upgrade to upstream 1.05.16.
d29627d
d29627d
* Fri Jan 15 2010 Johan Vromans <jvromans@squirrel.nl> - 1.05.15-2
d29627d
- Add missing file to db-postgres package.
d29627d
d29627d
* Fri Jan 15 2010 Johan Vromans <jvromans@squirrel.nl> - 1.05.15-1
d29627d
- Upgrade to upstream 1.05.15.
d29627d
d29627d
* Fri Jan 15 2010 Johan Vromans <jvromans@squirrel.nl> - 1.05.14-1
d29627d
- Upgrade to upstream 1.05.14.
d29627d
- Re-structure the package into several subpackages.
d29627d
e055075
* Wed Jan 06 2010 Johan Vromans <jvromans@squirrel.nl> - 1.04.06-1
e055075
- Upgrade to upstream 1.04.06.
e055075
36de0ba
* Mon Dec 28 2009 Johan Vromans <jvromans@squirrel.nl> - 1.04.05-2
36de0ba
- Fix for table detection with newer SQLite.
36de0ba
d522e17
* Mon Dec 28 2009 Johan Vromans <jvromans@squirrel.nl> - 1.04.05-1
d522e17
- Upgrade to upstream 1.04.05.
bf9f4e2
d29627d
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.04.04-2
d29627d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
d29627d
fafbed4
* Fri Jun 19 2009 Johan Vromans <jvromans@squirrel.nl> - 1.04.04-1
fafbed4
- Upgrade to upstream 1.04.04.
fafbed4
- Obsolete script patch.
fafbed4
- Obsolete conversion to UTF-8 of README.
fafbed4
c0f0847
* Wed Apr 22 2009 Johan Vromans <jvromans@squirrel.nl> - 1.04.03-3
c0f0847
- Remove Epoch: since it it not needed.
c0f0847
- Make subpackage depend on EVR.
c0f0847
c0f0847
* Mon Apr 20 2009 Johan Vromans <jvromans@squirrel.nl> - 1:1.04.03-2
c0f0847
- Use Epoch: to tighten dependency between basepackage and subpackage.
c0f0847
- Use %%global instead of %%define.
c0f0847
- Provide README.postgres as source, not as a patch.
c0f0847
- Keep timestamps when copying and installing.
c0f0847
- Simplify filelist building.
c0f0847
- Remove INSTALL from %%doc.
c0f0847
c0f0847
* Fri Apr 17 2009 Johan Vromans <jvromans@squirrel.nl> - 1.04.03-1
c0f0847
- Upgrade to upstream 1.04.03.
c0f0847
- Include SQLite with the base package.
c0f0847
- Enable database tests since we now require a db driver.
c0f0847
c0f0847
* Fri Jan 30 2009 Johan Vromans <jvromans@squirrel.nl> - 1.04.02-1
c0f0847
- Adapt to Fedora guidelines
c0f0847
c0f0847
* Sun Jan 26 2009 Johan Vromans <jvromans@squirrel.nl> - 1.04.02
c0f0847
- Remove QUICKSTART.
c0f0847
c0f0847
* Sat Jul 19 2008 Johan Vromans <jvromans@squirrel.nl> - 1.03.90
c0f0847
- Remove debian stuff
c0f0847
- Don't use unstable.
c0f0847
c0f0847
* Fri Apr 11 2008 Johan Vromans <jvromans@squirrel.nl> - 1.03.12
c0f0847
- Simplify by setting variables from the .in template
c0f0847
c0f0847
* Sun Apr 01 2007 Johan Vromans <jvromans@squirrel.nl> - 1.03.03
c0f0847
- Exclude some Wx files.
c0f0847
c0f0847
* Sun Nov 05 2006 Johan Vromans <jvromans@squirrel.nl> - 1.03.00
c0f0847
- Move DB drivers to separate package, and adjust req/prov.
c0f0847
c0f0847
* Mon Oct 16 2006 Johan Vromans <jvromans@squirrel.nl> - 1.01.02
c0f0847
- Prepare (but don't use) suffixes to separate production and unstable versions.
c0f0847
c0f0847
* Wed Aug 02 2006 Johan Vromans <jvromans@squirrel.nl> 0.92
c0f0847
- New URL. Add Vendor.
c0f0847
c0f0847
* Fri Jun 09 2006 Johan Vromans <jvromans@squirrel.nl> 0.60
c0f0847
- Remove man3.
c0f0847
c0f0847
* Thu Jun 08 2006 Johan Vromans <jvromans@squirrel.nl> 0.60
c0f0847
- Fix example.
c0f0847
c0f0847
* Mon Jun 05 2006 Johan Vromans <jvromans@squirrel.nl> 0.59
c0f0847
- Better script handling.
c0f0847
c0f0847
* Mon Apr 17 2006 Johan Vromans <jvromans@squirrel.nl> 0.56
c0f0847
- Initial provisions for GUI.
c0f0847
c0f0847
* Wed Apr 12 2006 Johan Vromans <jvromans@squirrel.nl> 0.56
c0f0847
- %%config(noreplace) for eekboek.conf.
c0f0847
c0f0847
* Tue Mar 28 2006 Johan Vromans <jvromans@squirrel.nl> 0.52
c0f0847
- Perl Independent Install
c0f0847
c0f0847
* Mon Mar 27 2006 Johan Vromans <jvromans@squirrel.nl> 0.52
c0f0847
- Add "--with dbtests" parameter for rpmbuild.
c0f0847
- Resultant rpm may be signed.
c0f0847
c0f0847
* Sun Mar 19 2006 Johan Vromans <jvromans@squirrel.nl> 0.50
c0f0847
- Switch to Build.PL instead of Makefile.PL.
c0f0847
c0f0847
* Mon Jan 30 2006 Johan Vromans <jvromans@squirrel.nl> 0.37
c0f0847
- Add build dep perl(Config::IniFiles).
c0f0847
c0f0847
* Fri Dec 23 2005 Wytze van der Raay <wytze@nlnet.nl> 0.23
c0f0847
- Fixes for x86_64 building problems.
c0f0847
c0f0847
* Wed Dec 12 2005 Johan Vromans <jvromans@squirrel.nl> 0.22
c0f0847
- Change some wordings.
c0f0847
- Add man1.
c0f0847
c0f0847
* Tue Dec 11 2005 Johan Vromans <jvromans@squirrel.nl> 0.21
c0f0847
- Add INSTALL QUICKSTART
c0f0847
c0f0847
* Thu Dec 08 2005 Johan Vromans <jvromans@squirrel.nl> 0.20
c0f0847
- Include doc/html.
c0f0847
c0f0847
* Tue Nov 22 2005 Johan Vromans <jvromans@squirrel.nl> 0.19
c0f0847
- More.
c0f0847
c0f0847
* Sun Nov 20 2005 Jos Vos <jos@xos.nl> 0.17-XOS.0beta1
c0f0847
- Initial version.