Name: segment
Version: 1.4.2
Release: 1%{?dist}
Summary: Java program/library used to split text into segments
License: MIT
URL: https://sourceforge.net/projects/segment/
# git clone git://git.code.sf.net/p/segment/segment
# (cd segment/ && git archive --format=tar --prefix=segment-1.4.2/ segment-1.4.2 | xz > ../segment-1.4.2.tar.xz)
Source0: %{name}-%{version}.tar.xz
# https://lists.sourceforge.net/lists/confirm/segment-repo/0efbc7e8ac8681e2c6cb708dd40061f1733c5df1
# file taken from http://downloads.sourceforge.net/segment/segment-1.4.2.zip
Source1: copying.html
# Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=10961075
BuildRequires: maven-local
BuildRequires: mvn(commons-logging:commons-logging)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.jvnet.jaxb2.maven2:maven-jaxb22-plugin)
BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:)
BuildArch: noarch
%description
Segment program is used to split text into segments (sentences,
paragraphs, words). Split rules are read from file
in XML based Segmentation Rules Exchange (SRX) standard format.
It can be used as a programming library.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q -n %{name}-%{version}
%pom_remove_plugin :maven-source-plugin
%pom_xpath_remove "pom:plugin[pom:artifactId ='maven-javadoc-plugin']/pom:executions"
%pom_xpath_set "pom:plugin[pom:groupId = 'org.jvnet.jaxb2.maven2']/pom:artifactId" maven-jaxb22-plugin
%pom_xpath_inject "pom:plugin[pom:groupId = 'org.jvnet.jaxb2.maven2']/pom:configuration" "false"
cp -p %SOURCE1 .
%mvn_file :%{name} %{name}
%mvn_package :%{name}::tests:
%build
%mvn_build
%install
%mvn_install
%files -f .mfiles
%doc README.txt
%license copying.html
%files javadoc -f .mfiles-javadoc
%license copying.html
%changelog
* Sat Sep 05 2015 gil cattaneo 1.4.2-1
- initial rpm