Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > 0ec6de553251c1b154928093639741e3 > files > 3

sablecc-3.7-8.mga9.src.rpm

Name:          sablecc
Version:       3.7
Release:       %mkrel 8
Summary:       Sable Research Group's Compiler Compiler
Group:         Development/Java
License:        LGPLv2+
URL:            http://sablecc.org
# https://github.com/SableCC/sablecc
Source0:        https://downloads.sourceforge.net/sablecc/sablecc-3.7.zip
#Source1:        https://repo1.maven.org/maven2/sablecc/sablecc/3.2/sablecc-3.2.pom
Patch0:         sablecc-fsf-addr.patch
BuildArch:      noarch

BuildRequires:  ant
BuildRequires:  javapackages-local

%description
SableCC is a parser generator which generates object-oriented frameworks for
building compilers, interpreters and other text parsers. SableCC keeps a clean
separation between machine and user code which leads to a shorter development 
cycle.

%prep
%setup -q 
%patch0 -p1
# The ant task has to be unpacked and sanitized prior to the main build. 
tar xzf %{name}-anttask-1.0.1.tar.gz
find -name "*.jar" -delete
find -name "*.class" -delete
rm %{name}-anttask-1.0.1.tar.gz

sed -i "s|lib/%{name}.jar|%{_javadir}/%{name}.jar|" bin/%{name}

%mvn_file %{name}:%{name} %{name}

%build
# Build the ant task and copy *only* that class into the main
# classes directory.  Don't copy everything, because there's a 
# namespace collision that will break the build.
pushd %{name}-anttask-1.0.1
ant 
mkdir -p ../classes/org/sablecc/ant/taskdef/
cp classes/org/sablecc/ant/taskdef/Sablecc.class ../classes/org/sablecc/ant/taskdef/
popd

# the define here prevents ant from redownloading the deleted tarball
ant -Dsablecc-anttask_available=true jar

%install
%mvn_artifact %{name}:%{name}:%{version} lib/%{name}.jar
%mvn_install

mkdir -p %{buildroot}%{_bindir}
install -pm 0755 bin/%{name} %{buildroot}%{_bindir}/%{name}

%files -f .mfiles
%{_bindir}/%{name}
%doc README.html ChangeLog AUTHORS THANKS
%license LICENSE COPYING-LESSER
%doc doc/*


%changelog
* Sat Mar 26 2022 umeabot <umeabot> 3.7-8.mga9
+ Revision: 1828761
- Mageia 9 Mass Rebuild

* Wed Feb 12 2020 umeabot <umeabot> 3.7-7.mga8
+ Revision: 1508071
- Mageia 8 Mass Rebuild

* Fri Sep 21 2018 umeabot <umeabot> 3.7-6.mga7
+ Revision: 1291463
- Mageia 7 Mass Rebuild

* Mon Oct 02 2017 daviddavid <daviddavid> 3.7-5.mga7
+ Revision: 1162589
- update to 3.7 (rhbz#1264621) (sync with fc27)
- regenerate build-requires

* Tue Feb 09 2016 umeabot <umeabot> 3.2-7.mga6
+ Revision: 951997
- Mageia 6 Mass Rebuild

* Mon Jan 12 2015 daviddavid <daviddavid> 3.2-6.mga5
+ Revision: 810165
- use .mfiles generated during build
- update BuildRequires and Requires
- fix Group

* Wed Oct 15 2014 umeabot <umeabot> 3.2-5.mga5
+ Revision: 741052
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 3.2-4.mga5
+ Revision: 689016
- Mageia 5 Mass Rebuild

* Fri Oct 18 2013 umeabot <umeabot> 3.2-3.mga4
+ Revision: 518266
- Mageia 4 Mass Rebuild

* Mon Jan 14 2013 umeabot <umeabot> 3.2-2.mga3
+ Revision: 381642
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Mon Mar 05 2012 gil <gil> 3.2-1.mga3
+ Revision: 218380
- imported package sablecc