91 lines
2.8 KiB
RPMSpec
91 lines
2.8 KiB
RPMSpec
Name: mysema-commons-lang
|
|
Version: 0.2.4
|
|
Release: 1
|
|
Summary: Mysema Commons Lang
|
|
License: ASL 2.0
|
|
URL: http://www.mysema.com/
|
|
Source0: https://repo1.maven.org/maven2/com/mysema/commons/%{name}/%{version}/%{name}-%{version}-sources.jar
|
|
Source1: https://repo1.maven.org/maven2/com/mysema/commons/%{name}/%{version}/%{name}-%{version}.pom
|
|
Source2: http://www.apache.org/licenses/LICENSE-2.0.txt
|
|
|
|
BuildRequires: maven-local mvn(junit:junit) mvn(org.apache.felix:maven-bundle-plugin)
|
|
BuildRequires: mvn(org.apache.maven.plugins:maven-jar-plugin)
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
Mysema Commons Lang provides:
|
|
* General assertion utilities
|
|
* Empty implementation of the CloseableIterator interface
|
|
* Adapter implementation for Iterator and CloseableIterator instances
|
|
* Typed pair of values
|
|
* URIResolver provides URI resolving functionality
|
|
* URLEncoder provides URL encoding functionality
|
|
|
|
%package javadoc
|
|
Summary: Javadoc for %{name}
|
|
|
|
%description javadoc
|
|
This package contains javadoc for %{name}.
|
|
|
|
%prep
|
|
%setup -T -q -c
|
|
mkdir -p src/main/{java,resources}
|
|
(
|
|
cd src/main/java
|
|
%jar -xf %{SOURCE0}
|
|
rm -rf META-INF
|
|
)
|
|
find src/main/java/ -type d | while read dirname ; do
|
|
newdirname=`echo $dirname | sed "s:src/main/java:src/main/resources:g"`
|
|
mkdir -p $newdirname
|
|
done
|
|
find src/main/java/ -type f | grep -v "\.java" | while read cpfrom ; do
|
|
cpto=`echo $cpfrom | sed "s:src/main/java:src/main/resources:g"`
|
|
cp $cpfrom $cpto
|
|
done
|
|
cp -p %{SOURCE1} pom.xml
|
|
%pom_remove_parent
|
|
%pom_remove_plugin com.springsource.bundlor:com.springsource.bundlor.maven
|
|
%pom_add_plugin org.apache.felix:maven-bundle-plugin . '
|
|
<configuration>
|
|
<instructions>
|
|
<Bundle-Name>Commons Lang</Bundle-Name>
|
|
<Bundle-SymbolicName>com.mysema.commons.lang</Bundle-SymbolicName>
|
|
<Bundle-Vendor>Mysema</Bundle-Vendor>
|
|
<Export-Package>com.mysema.commons.lang*;version="${project.version}"</Export-Package>
|
|
</instructions>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>bundle-manifest</id>
|
|
<phase>process-classes</phase>
|
|
<goals>
|
|
<goal>manifest</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>'
|
|
%pom_xpath_remove "pom:plugin[pom:artifactId='maven-jar-plugin']/pom:configuration/pom:useDefaultManifestFile"
|
|
%pom_xpath_inject "pom:plugin[pom:artifactId='maven-jar-plugin']/pom:configuration" '
|
|
<archive>
|
|
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
|
</archive>'
|
|
cp -p %{SOURCE2} LICENSE
|
|
sed -i 's/\r//' LICENSE
|
|
%mvn_file com.mysema.commons:%{name} %{name}
|
|
|
|
%build
|
|
%mvn_build -- -Dproject.build.sourceEncoding=UTF-8
|
|
|
|
%install
|
|
%mvn_install
|
|
|
|
%files -f .mfiles
|
|
%license LICENSE
|
|
|
|
%files javadoc -f .mfiles-javadoc
|
|
%license LICENSE
|
|
|
|
%changelog
|
|
* Sat Jul 25 2020 leiju <leiju4@huawei.com> - 0.2.4-1
|
|
- Package init
|