summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
Diffstat (limited to 'pcr')
-rw-r--r--pcr/javamail/PKGBUILD83
1 files changed, 42 insertions, 41 deletions
diff --git a/pcr/javamail/PKGBUILD b/pcr/javamail/PKGBUILD
index 1ad17d3a3..1778031e3 100644
--- a/pcr/javamail/PKGBUILD
+++ b/pcr/javamail/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
pkgname=javamail
-pkgver=1.5.4
+pkgver=1.5.6
pkgrel=1
pkgdesc="JavaMail API Reference Implementation"
arch=('any')
@@ -9,72 +9,73 @@ url="https://javamail.java.net"
license=('CDDL, GPL2 with Classpath Exception')
depends=('java-runtime')
makedepends=('apache-ant' 'jh' 'tomcat8')
-source=("https://java.net/downloads/${pkgname}/source/${pkgname}-${pkgver}-src.zip"
- "https://repo1.maven.org/maven2/com/sun/mail/javax.mail/${pkgver}/javax.mail-${pkgver}.pom"
- "https://repo1.maven.org/maven2/javax/mail/javax.mail-api/${pkgver}/javax.mail-api-${pkgver}.pom"
- "https://repo1.maven.org/maven2/com/sun/mail/logging-mailhandler/${pkgver}/logging-mailhandler-${pkgver}.pom")
-md5sums=('b544903115ebc14702101e607f0429bd'
- 'f41932d909b8511b8ad0a4c711040147'
- '313ab57304d245eeefbac89e0e213801'
- 'acc5f53f9bbdac0dd91faa5127cb11b0')
+source=("https://java.net/downloads/$pkgname/source/$pkgname-$pkgver-src.zip")
+sha256sums=('6754e4c3f3f2a50fc4bc9c6f4e041dd91dc99a716d38bceeac0f5327e2bf73f5')
-build() {
- cd ${srcdir}
- ant release \
- -Djavaee.jar=/usr/share/java/tomcat8/servlet-api.jar
+prepare() {
+ cd $srcdir
+ cp -v mail/pom.xml javax.mail.pom
+ cp -v mailapijar/pom.xml javax.mail-api.pom
+ cp -v mailhandler/pom.xml logging-mailhandler.pom
+}
- cp "target/release/mail.jar" "javax.mail.jar"
+build() {
+ cd $srcdir
+ ant jars docs \
+ -Djavaee.jar=/usr/share/java/tomcat8/servlet-api.jar \
+ -Drelease.mail.jar=javax.mail.jar \
+ -Drelease.version=$pkgver
- jar -cvf "javax.mail-api.jar" -C "mail/target/classes" "javax"
- jar -cvf "logging-mailhandler.jar" -C "mail/target/classes" "com/sun/mail/util/logging"
+ jar -cvf javax.mail-api.jar -C mail/target/classes javax
+ jar -cvf logging-mailhandler.jar -C mail/target/classes com/sun/mail/util/logging
}
package() {
- cd "${srcdir}"
+ cd $srcdir
# Install license file
- install -Dm644 "mail/src/main/resources/META-INF/LICENSE.txt" \
- "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
+ install -Dm644 mail/src/main/resources/META-INF/LICENSE.txt \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
# Install documentation
- install -d "${pkgdir}/usr/share/doc/${pkgname}"
- cp -r "target/release/docs/javadocs" "${pkgdir}/usr/share/doc/${pkgname}"
+ install -d "$pkgdir/usr/share/doc/$pkgname"
+ cp -r target/release/docs/javadocs "$pkgdir/usr/share/doc/$pkgname"
# Install Maven artifacts
- export DESTDIR=${pkgdir}
+ export DESTDIR=$pkgdir
for artifact in "all" "dsn" "gimap" "imap" "mailapi" "pop3" "smtp"; do
- if [[ -f "target/release/lib/${artifact}.jar" ]]; then
+ if [[ -f "target/release/lib/$artifact.jar" ]]; then
# This artifact has a jar file
- jh mvn-install "com.sun.mail" ${artifact} ${pkgver} \
- "${artifact}/pom.xml" \
- "target/release/lib/${artifact}.jar" \
- "${artifact}.jar"
+ jh mvn-install com.sun.mail $artifact $pkgver \
+ "$artifact/pom.xml" \
+ "target/release/lib/$artifact.jar" \
+ "$artifact-$pkgver.jar"
# Symlink them to /usr/share/java
- ln -s "/usr/share/java/${artifact}.jar" \
- "${pkgdir}/usr/share/java/${artifact}-${pkgver}.jar"
+ ln -s "/usr/share/java/$artifact-$pkgver.jar" \
+ "$pkgdir/usr/share/java/$artifact.jar"
else
# This artifact is just a pom
- jh mvn-install "com.sun.mail" ${artifact} ${pkgver} \
+ jh mvn-install com.sun.mail $artifact $pkgver \
"pom.xml"
fi
done
for artifact in "javax.mail" "logging-mailhandler"; do
- jh mvn-install "com.sun.mail" ${artifact} ${pkgver} \
- "${artifact}-${pkgver}.pom" \
- "${artifact}.jar" \
- "${artifact}.jar"
+ jh mvn-install com.sun.mail $artifact $pkgver \
+ "$artifact.pom" \
+ "$artifact.jar" \
+ "$artifact-$pkgver.jar"
# Symlink them to /usr/share/java
- ln -s "/usr/share/java/${artifact}.jar" \
- "${pkgdir}/usr/share/java/${artifact}-${pkgver}.jar"
+ ln -s "/usr/share/java/$artifact-$pkgver.jar" \
+ "$pkgdir/usr/share/java/$artifact.jar"
done
- jh mvn-install "javax.mail" "javax.mail-api" ${pkgver} \
- "javax.mail-api-${pkgver}.pom" \
+ jh mvn-install javax.mail javax.mail-api $pkgver \
+ "javax.mail-api.pom" \
"javax.mail-api.jar" \
- "javax.mail-api.jar"
- ln -s "/usr/share/java/javax.mail-api.jar" \
- "${pkgdir}/usr/share/java/javax.mail-api-${pkgver}.jar"
+ "javax.mail-api-$pkgver.jar"
+ ln -s "/usr/share/java/javax.mail-api-$pkgver.jar" \
+ "$pkgdir/usr/share/java/javax.mail-api.jar"
}