General cleanup

* Install NOTICE.txt file
* Fix javadir directory ownership
* Preserve timestamps
This commit is contained in:
Mikolaj Izdebski 2012-07-27 13:05:37 +02:00
parent b0e6b95257
commit 3f7f383035

View File

@ -3,7 +3,7 @@
Name: httpcomponents-core
Summary: Set of low level Java HTTP transport components for HTTP services
Version: 4.2.1
Release: 1%{?dist}
Release: 2%{?dist}
Group: Development/Libraries
License: ASL 2.0
URL: http://hc.apache.org/
@ -75,23 +75,23 @@ done
mvn-rpmbuild install javadoc:aggregate
%install
install -d %{buildroot}/%{_mavenpomdir}
install -d %{buildroot}/%{_javadir}/%{base_name}
install -dm 755 %{buildroot}/%{_mavenpomdir}
install -dm 755 %{buildroot}/%{_javadir}/%{base_name}
for m in httpcore httpcore-nio; do
# poms
install -m 0644 $m/pom.xml %{buildroot}/%{_mavenpomdir}/JPP.%{base_name}-$m.pom
install -pm 644 $m/pom.xml %{buildroot}/%{_mavenpomdir}/JPP.%{base_name}-$m.pom
# jars - osgi doesn't have one
if [ -f $m/target/$m-%{version}.jar ];then
install -m 0644 $m/target/$m-%{version}.jar %{buildroot}%{_javadir}/%{base_name}/$m.jar
install -m 644 $m/target/$m-%{version}.jar %{buildroot}%{_javadir}/%{base_name}/$m.jar
fi
%add_maven_depmap JPP.%{base_name}-$m.pom %{base_name}/$m.jar
done
# parent
install -D -m 0644 pom.xml %{buildroot}/%{_mavenpomdir}/JPP.%{base_name}-%{name}.pom
install -pm 644 pom.xml %{buildroot}/%{_mavenpomdir}/JPP.%{base_name}-%{name}.pom
%add_maven_depmap JPP.%{base_name}-%{name}.pom
# javadocs
@ -99,16 +99,22 @@ install -dm 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
%files
%doc README.txt LICENSE.txt RELEASE_NOTES.txt
%doc LICENSE.txt NOTICE.txt
%doc README.txt RELEASE_NOTES.txt
%{_mavendepmapfragdir}/%{name}
%{_mavenpomdir}/JPP.%{basename}*.pom
%{_javadir}/%{basename}
%{_mavenpomdir}/JPP.%{base_name}*.pom
%{_javadir}/%{base_name}
%files javadoc
%doc LICENSE.txt
%doc LICENSE.txt NOTICE.txt
%doc %{_javadocdir}/%{name}
%changelog
* Fri Jul 27 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2.1-2
- Install NOTICE.txt file
- Fix javadir directory ownership
- Preserve timestamps
* Mon Jul 23 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2.1-1
- Update to upstream version 4.2.1
- Convert patches to POM macros