Name: derby
Version: 10.14.2.0
Release: 1%{?dist}
Summary: Relational database implemented entirely in Java
License: ASL 2.0
URL: http://db.apache.org/derby/
Source0: http://archive.apache.org/dist/db/derby/db-derby-%{version}/db-derby-%{version}-src.tar.gz
Source1: derby-script
Source2: derby.service
# Changes needed for latest javacc
Patch1: derby-javacc.patch
# For compatibility with lucene >= 7.x
Patch2: derby-lucene.patch
BuildRequires: apache-parent
BuildRequires: javapackages-local
BuildRequires: glassfish-servlet-api
BuildRequires: jakarta-oro
BuildRequires: javacc
BuildRequires: json_simple
BuildRequires: lucene
BuildRequires: lucene-analysis
BuildRequires: lucene-queryparser
BuildRequires: junit
BuildRequires: ant
BuildRequires: systemd
Requires(pre): shadow-utils
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
# Explicit requires for javapackages-tools since scripts
# use /usr/share/java-utils/java-functions
Requires: javapackages-tools
BuildArch: noarch
%description
Apache Derby, an Apache DB sub-project, is a relational database implemented
entirely in Java. Some key advantages include a small footprint, conformance
to Java, JDBC, and SQL standards and embedded JDBC driver.
%package javadoc
Summary: API documentation for derby.
%description javadoc
%{summary}.
%prep
%setup -q -c
find -name '*.jar' -delete
find -name '*.class' -delete
pushd db-derby-%{version}-src
#rm java/engine/org/apache/derby/impl/sql/compile/Token.java
%patch1 -p0
%patch2 -p2 -b .lucene
# Don't use Class-Path in manifests
sed -i -e '/Class-Path/d' build.xml
# Don't download online packagelists
sed -e 's/initjars,set-doclint,install_packagelists/initjars,set-doclint/' \
-e '//dev/null || groupadd -r derby
getent passwd derby >/dev/null || \
useradd -r -g derby -d /var/lib/derby -s /sbin/nologin \
-c "Apache Derby service account" derby
exit 0
%post
%systemd_post derby.service
%preun
%systemd_preun derby.service
%postun
%systemd_postun_with_restart derby.service
%files -f db-derby-%{version}-src/.mfiles
%{_bindir}/*
%doc db-%{name}-%{version}-src/published_api_overview.html
%doc db-%{name}-%{version}-src/RELEASE-NOTES.html
%doc db-%{name}-%{version}-src/README
%{_unitdir}/%{name}.service
%attr(755,derby,derby) %{_sharedstatedir}/%{name}
%license db-derby-%{version}-src/LICENSE
%license db-derby-%{version}-src/NOTICE
%files javadoc -f db-derby-%{version}-src/.mfiles-javadoc
%license db-derby-%{version}-src/LICENSE
%license db-derby-%{version}-src/NOTICE
%changelog
* Fri Dec 13 2019 Jakub Jelen - 10.14.2.0-1
- Rebase to current version and unbreak build
* Wed Jul 24 2019 Fedora Release Engineering - 10.13.1.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jan 31 2019 Fedora Release Engineering - 10.13.1.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Aug 31 2018 Severin Gehwolf - 10.13.1.1-5
- Add explicit requirement on javapackages-tools since scripts
use java-functions. See RHBZ#1600426.
* Thu Jul 12 2018 Fedora Release Engineering - 10.13.1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering - 10.13.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering - 10.13.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Mat Booth - 10.13.1.1-1
- Update to latest upstream release and fix failure to build from source
- rhbz#1418121
* Fri Feb 10 2017 Fedora Release Engineering - 10.11.1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Feb 10 2016 Mat Booth - 10.11.1.1-3
- Fix FTBFS
* Wed Feb 03 2016 Fedora Release Engineering - 10.11.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jun 18 2015 Mat Booth - 10.11.1.1-1
- Fix FTBFS, update to 10.11.1.1 release
* Wed Jun 17 2015 Fedora Release Engineering - 10.10.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue Jun 10 2014 Mat Booth - 10.10.2.0-1
- Update to latest upstream version
- Fix BR: junit4 -> junit
- Install with xmvn
- Package javadocs
* Sat Jun 07 2014 Fedora Release Engineering - 10.9.1.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Tue Mar 04 2014 Stanislav Ochotnicky - 10.9.1.0-7
- Use Requires: java-headless rebuild (#1067528)
* Tue Oct 15 2013 Michal Srb - 10.9.1.0-6
- Add derbyclient.jar to classpath of derby-ij (Thanks J. Stribny)
* Fri Oct 11 2013 Michal Srb - 10.9.1.0-5
- Add more classes to derbynet.jar (related to #830661)
- Create and own derby home dir
- Simplify systemd service file a bit
* Mon Aug 12 2013 Mat Booth - 10.9.1.0-4
- Fix FTBFS rhbz #992123
- Update servlet BR
- Add missing BR on systemd-units
- Drop versioned jars
- Remove use of deprecated add_to_maven_depmap macro
* Sat Aug 03 2013 Fedora Release Engineering - 10.9.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Feb 25 2013 Andy Grimm - 10.9.1.0-2
- Add systemd service unit (RHBZ#741134)
* Mon Feb 25 2013 Andy Grimm - 10.9.1.0-1
- Version bump
- Add classes to derbynet.jar (RHBZ#830661)
* Wed Feb 13 2013 Fedora Release Engineering - 10.6.2.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Fri Aug 10 2012 Andy Grimm - 10.6.2.1-4
- Add gcj buildreq to fix FTBFS
* Wed Jul 18 2012 Fedora Release Engineering - 10.6.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jan 13 2012 Fedora Release Engineering - 10.6.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Nov 29 2011 Alexander Kurtakov 10.6.2.1-1
- Update to newer upstream version.
* Fri Feb 25 2011 Lubomir Rintel - 10.6.1.0-6
- Fix startup script (Thomas Meyer, #668828)
* Tue Feb 08 2011 Fedora Release Engineering - 10.6.1.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Fri Nov 26 2010 Stanislav Ochotnicky - 10.6.1.0-4
- Fix pom filenames (Resolves rhbz#655794)
* Tue Jul 27 2010 Lubomir Rintel - 10.6.1.0-3
- Fix buildrequires
* Tue Jul 27 2010 Lubomir Rintel - 10.6.1.0-2
- Add tool launchers
- Add POMs
* Mon Jun 28 2010 Lubomir Rintel - 10.6.1.0-1
- Initial packaging