Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2011-02-24 09:30:46 -0500
committerAlexander Kurtakov2011-02-24 09:30:46 -0500
commitdf32f95c01fbdb421e7505cc4c9e146a1905a990 (patch)
tree4bd29e63d3061894db578f71994479b25be2e5de /rpmstubby
parent29b26c05c594be4255ede9fa9be6ed19bb249a30 (diff)
downloadorg.eclipse.linuxtools-df32f95c01fbdb421e7505cc4c9e146a1905a990.tar.gz
org.eclipse.linuxtools-df32f95c01fbdb421e7505cc4c9e146a1905a990.tar.xz
org.eclipse.linuxtools-df32f95c01fbdb421e7505cc4c9e146a1905a990.zip
2011-02-24 Alexander Kurtakov <akurtako@redhat.com>
Adapt to current packaging guidelines. * src/org/eclipse/linuxtools/rpmstubby/StubbyPomGenerator.java (generateSpecfile): Drop buildroot. (generateInstallSection): Drop symlinks. (generateFilesSections): Likewise. (generateBuildSection): Invoke mvn-rpmbuld.
Diffstat (limited to 'rpmstubby')
-rw-r--r--rpmstubby/org.eclipse.linuxtools.rpmstubby/ChangeLog7
-rw-r--r--rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/rpmstubby/StubbyPomGenerator.java29
2 files changed, 11 insertions, 25 deletions
diff --git a/rpmstubby/org.eclipse.linuxtools.rpmstubby/ChangeLog b/rpmstubby/org.eclipse.linuxtools.rpmstubby/ChangeLog
index 4efaba904a..66c776f479 100644
--- a/rpmstubby/org.eclipse.linuxtools.rpmstubby/ChangeLog
+++ b/rpmstubby/org.eclipse.linuxtools.rpmstubby/ChangeLog
@@ -1,3 +1,10 @@
+2011-02-24 Alexander Kurtakov <akurtako@redhat.com>
+ Adapt to current packaging guidelines.
+ * src/org/eclipse/linuxtools/rpmstubby/StubbyPomGenerator.java (generateSpecfile): Drop buildroot.
+ (generateInstallSection): Drop symlinks.
+ (generateFilesSections): Likewise.
+ (generateBuildSection): Invoke mvn-rpmbuld.
+
2010-08-31 Alexander Kurtakov <akurtako@redhat.com>
* META-INF/MANIFEST.MF: Move to using commands framework.
diff --git a/rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/rpmstubby/StubbyPomGenerator.java b/rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/rpmstubby/StubbyPomGenerator.java
index 6d1740bf88..55e9cc22e4 100644
--- a/rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/rpmstubby/StubbyPomGenerator.java
+++ b/rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/rpmstubby/StubbyPomGenerator.java
@@ -87,8 +87,6 @@ public class StubbyPomGenerator {
buffer.append("License: " + model.getLicense() + "\n");
buffer.append("URL: " + model.getURL() + "\n");
buffer.append("Source0: #FIXME\n");
- buffer
- .append("BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)\n\n");
buffer.append("BuildArch: noarch\n\n");
generateRequires(buffer);
buffer.append("\n%description\n" + model.getDescription() + "\n\n");
@@ -97,7 +95,6 @@ public class StubbyPomGenerator {
generateBuildSection(buffer);
generateInstallSection(buffer);
generatePostPostun(buffer);
- generateCleanSection(buffer);
generateFilesSections(buffer);
generateChangelog(buffer);
@@ -137,24 +134,12 @@ public class StubbyPomGenerator {
buffer.append("#FIXME\n");
}
- private void generateCleanSection(StringBuilder buffer) {
- buffer.append("%clean\n");
- buffer.append("rm -rf %{buildroot}\n\n");
- }
-
private void generateInstallSection(StringBuilder buffer) {
buffer.append("%install\n");
- buffer.append("rm -rf %{buildroot}\n\n");
-
buffer.append("# jars\n");
buffer.append("install -d -m 0755 %{buildroot}%{_javadir}\n");
buffer
- .append("install -m 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar\n\n");
-
- buffer
- .append("(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; \\\n");
- buffer
- .append(" do ln -sf ${jar} `echo $jar| sed \"s|-%{version}||g\"`; done)\n\n");
+ .append("install -m 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}\n\n");
buffer.append("%add_to_maven_depmap " + model.getGroupId() + " "
+ model.getArtifactId() + " %{version} JPP "
@@ -169,11 +154,9 @@ public class StubbyPomGenerator {
buffer.append("# javadoc\n");
buffer
- .append("install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}-%{version}\n");
- buffer
- .append("cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}-%{version}/\n");
+ .append("install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}\n");
buffer
- .append("ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}\n");
+ .append("cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/\n");
buffer.append("rm -rf target/site/api*\n\n");
}
@@ -186,7 +169,6 @@ public class StubbyPomGenerator {
buffer.append("%files javadoc\n");
buffer.append("%defattr(-,root,root,-)\n");
- buffer.append("%{_javadocdir}/%{name}-%{version}\n");
buffer.append("%{_javadocdir}/%{name}\n\n");
}
@@ -197,11 +179,8 @@ public class StubbyPomGenerator {
private void generateBuildSection(StringBuilder buffer) {
buffer.append("%build\n");
- buffer.append("export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository\n");
- buffer.append("mvn-jpp \\\n");
+ buffer.append("mvn-rpmbuild \\\n");
buffer.append(" -e \\\n");
- buffer.append(" -Dmaven2.jpp.mode=true \\\n");
- buffer.append(" -Dmaven.repo.local=$MAVEN_REPO_LOCAL \\\n");
buffer.append(" install javadoc:javadoc\n\n");
}

Back to the top