[pkg-java] r8165 - trunk/maven-repo-helper/src/main/bin
ludovicc-guest at alioth.debian.org
ludovicc-guest at alioth.debian.org
Wed Apr 1 20:07:52 UTC 2009
Author: ludovicc-guest
Date: 2009-04-01 20:07:52 +0000 (Wed, 01 Apr 2009)
New Revision: 8165
Removed:
trunk/maven-repo-helper/src/main/bin/dh_mavenrepo
trunk/maven-repo-helper/src/main/bin/mh_generate_scripts
Log:
* Remove old scripts
Deleted: trunk/maven-repo-helper/src/main/bin/dh_mavenrepo
===================================================================
--- trunk/maven-repo-helper/src/main/bin/dh_mavenrepo 2009-04-01 20:06:30 UTC (rev 8164)
+++ trunk/maven-repo-helper/src/main/bin/dh_mavenrepo 2009-04-01 20:07:52 UTC (rev 8165)
@@ -1,102 +0,0 @@
-#!/usr/bin/perl -w
-
-=head1 NAME
-
-dh_mavenrepo - manage the Maven repository when installing Java libraries
-
-=cut
-
-use strict;
-use File::Find;
-use Debian::Debhelper::Dh_Lib;
-
-=head1 SYNOPSIS
-
-B<dh_mavenrepo> [S<I<debhelper options>>] [B<-n>]
-
-=head1 DESCRIPTION
-
-dh_mavenrepo is a debhelper program that will scan your package for Maven
-POM files and generate installation scripts to keep the Debian parent POM
-in the Maven repository updated with the current list of libraries and their
-versions.
-
-=head1 OPTIONS
-
-=over 4
-
-=item B<-n>, B<--noscripts>
-
-Do not modify postinst/postrm scripts.
-
-=back
-
-=head1 CONFORMS TO
-
-Java policy, version TODO
-
-=cut
-
-init();
-
-my $versionPropertiesFile = "debian/tmp/versions.properties";
-
-if (! $dh{NOSCRIPTS}) {
- foreach my $package (@{$dh{DOPACKAGES}}) {
- doit(("rm","-rf","debian/tmp"));
- if ( -e "debian/$package.poms" ) {
- cleanpoms("debian/$package.poms");
- my $libraries = readLibraries();
- autoscript($package,"postinst","postinst-maven-repo","s%#PACKAGE#%$package%;s%#LIBRARIES#%$libraries%");
- autoscript($package,"postrm","postrm-maven-repo","s%#LIBRARIES#%$libraries%");
- }
- }
-}
-
-sub cleanpoms {
- my $pomsFile = shift;
- open(POMS, $pomsFile) ||
- error("Can't open $pomsFile: $!");
- foreach my $line (<POMS>) {
- chomp($line);
- if ($line ne '') {
- my $pom='';
- my $opts='';
- my @elems=split(' ',$line);
- push(@elems, '');
- ($pom,$opts)=@elems;
- doit("mh_cleanpom $opts $pom");
- }
- }
- close(POMS);
-}
-
-sub readLibraries {
- open(VERSIONS, $versionPropertiesFile) ||
- error("Can't open $versionPropertiesFile: $!");
- my $libraries = '';
- foreach my $line (<VERSIONS>) {
- chomp($line);
- $_=$line;
- if (! ($line eq '') && ! (substr($line,0,1) eq '#')) {
- s/\.version=/ /g;
- $libraries .= $_ . ",";
- }
- }
- close(VERSIONS);
- return $libraries;
-}
-
-=head1 SEE ALSO
-
-L<debhelper(7)>
-
-This program is a part of maven-repo-helper but is made to work with debhelper.
-
-=head1 AUTHORS
-
-Ludovic Claude <ludovic.claude at laposte.net>
-
-Also includes bits of the dh_pycentral written by Raphael Hertzog <hertzog at debian.org>.
-
-=cut
\ No newline at end of file
Deleted: trunk/maven-repo-helper/src/main/bin/mh_generate_scripts
===================================================================
--- trunk/maven-repo-helper/src/main/bin/mh_generate_scripts 2009-04-01 20:06:30 UTC (rev 8164)
+++ trunk/maven-repo-helper/src/main/bin/mh_generate_scripts 2009-04-01 20:07:52 UTC (rev 8165)
@@ -1,79 +0,0 @@
-#!/bin/bash
-# Generate some of the build and installation scripts
-
-find_poms() {
- if [ ! -f debian/$PACKAGE.poms ]; then
- find . -path '*/.*' -prune -o -type f -print | grep -e /pom\.xml$ | grep -v "debian/tmp" | sed s,./,, > debian/$PACKAGE.poms
- fi
- cat debian/$PACKAGE.poms
-}
-
-PACKAGE=$1
-VERSION_PROPERTIES_FILE=$2
-
-if [ -z "$PACKAGE" ]; then
- echo "Syntax:"
- echo "mh_generate_scripts <binary package> [versions properties file]"
- exit 1
-fi
-if [ -z "$VERSION_PROPERTIES_FILE" ]; then
- VERSION_PROPERTIES_FILE="debian/tmp/versions.properties"
-fi
-
-mh_lspoms $PACKAGE > /dev/null
-
-# Automatic execution of mh_cleanpom to fill versions.properties
-if [ ! -f "$VERSION_PROPERTIES_FILE" ]; then
- echo "$VERSION_PROPERTIES_FILE not found, trying to generate it by executing"
- echo "mh_cleanpom on all pom.xml files"
- cat debian/$PACKAGE.poms | while read POM OPTS; do
- echo "mh_cleanpom $POM"
- mh_cleanpom $OPTS $POM
- done
-fi
-
-echo_script() {
- echo "#!/bin/sh"
- echo "set -e"
- LIBRARIES=$(cat $VERSION_PROPERTIES_FILE | grep -v ^#.* | sed s/\.version=/' '/ | tr '\n' ',')
- cat /usr/share/maven-repo-helper/post$DO.tmpl | sed s/"#PACKAGE#"/"$PACKAGE"/g | sed sed s/"#LIBRARIES#"/"$LIBRARIES"/g
- echo "#DEBHELPER#"
-}
-
-DO="inst"
-echo_script > debian/$PACKAGE.post$DO
-echo "debian/$PACKAGE.post$DO generated"
-DO="rm"
-echo_script > debian/$PACKAGE.post$DO
-echo "debian/$PACKAGE.post$DO generated"
-
-BIN_PACKAGE="\$(PACKAGE)"
-SOURCE=$(dpkg-parsechangelog | egrep '^Source:' | cut -f2 -d' ')
-if [ "lib$SOURCE-java" = "$PACKAGE" ]; then
- BIN_PACKAGE="lib\$(PACKAGE)-java"
-elif [ "$SOURCE-java" = "$PACKAGE" ]; then
- BIN_PACKAGE="\$(PACKAGE)-java"
-fi
-
-echo ""
-echo "Add the following lines to debian/rules"
-echo "You may need to correct manually some details"
-echo ""
-echo "PACKAGE := \$(DEB_SOURCE_PACKAGE)"
-echo "VERSION := \$(DEB_UPSTREAM_VERSION)"
-echo ""
-echo "binary-post-install/$BIN_PACKAGE::"
-
-if [ -f debian/tmp/pom.properties ]; then
- source debian/tmp/pom.properties
-fi
-cat debian/$PACKAGE.poms | while read POM OPTS; do
- if [[ "$POM" = "pom.xml" || "$POM" = "debian/pom.xml" ]]; then
- echo " mh_installpom $OPTS -p$BIN_PACKAGE $POM"
- echo " mh_installjar -p$BIN_PACKAGE $POM build/\$(PACKAGE)-\$(VERSION).jar usr/share/java/\$(PACKAGE)-\$(VERSION).jar usr/share/java/\$(PACKAGE).jar"
- elif [ ! -z "$POM" ]; then
- BASENAME=$(basename $(dirname $POM))
- echo " mh_installpom $OPTS -p$BIN_PACKAGE $POM"
- echo " mh_installjar -p$BIN_PACKAGE $POM build/\$(PACKAGE)-\$(VERSION).jar usr/share/java/$BASENAME-\$(VERSION).jar usr/share/java/\$(PACKAGE).jar"
- fi
-done
\ No newline at end of file
More information about the pkg-java-commits
mailing list