[Pkg-octave-commit] r1506 - in octave-pkg-dev/trunk: . debian
Rafael Laboissiere
rafael at alioth.debian.org
Tue Mar 25 15:10:49 UTC 2008
Author: rafael
Date: 2008-03-25 15:10:49 +0000 (Tue, 25 Mar 2008)
New Revision: 1506
Removed:
octave-pkg-dev/trunk/get-oct-pkg-src.pl
Modified:
octave-pkg-dev/trunk/debian/install
Log:
Remove the get-oct-pkg-src.pl script, which is obsolete now. (This
removal is part of the campaign: "Make Thomas happy: kill a Perl
script each day" :-)
Modified: octave-pkg-dev/trunk/debian/install
===================================================================
--- octave-pkg-dev/trunk/debian/install 2008-03-25 15:06:58 UTC (rev 1505)
+++ octave-pkg-dev/trunk/debian/install 2008-03-25 15:10:49 UTC (rev 1506)
@@ -2,6 +2,5 @@
octave-pkg-dev.pl usr/share/octave/debian
postinst usr/share/octave/debian
prerm usr/share/octave/debian
-get-oct-pkg-src.pl usr/share/octave/debian
pkg.m usr/share/octave/debian
cstrcat.m usr/share/octave/debian
Deleted: octave-pkg-dev/trunk/get-oct-pkg-src.pl
===================================================================
--- octave-pkg-dev/trunk/get-oct-pkg-src.pl 2008-03-25 15:06:58 UTC (rev 1505)
+++ octave-pkg-dev/trunk/get-oct-pkg-src.pl 2008-03-25 15:10:49 UTC (rev 1506)
@@ -1,93 +0,0 @@
-#!/usr/bin/perl -w
-
-# get-oct-pkg-src.pl: Donwload octave-forge pkg source tarball
-# This file is part of the octave-pkg-dev Debian package
-
-# Copyright (c) 2008 Rafael Laboissiere <rafael at debian.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-### Extract the name of the script by stripping the path
-(my $prog = $0) =~ s:.*/::;
-
-### Open Debian control and changelog files
-open (CONTROL, "< ./debian/control")
- or die "$prog:E: File ./debian/control not found\n";
-
-open (CHGLOG, "< debian/changelog")
- or die "$prog:E: File ./debian/changelog not found\n";
-
-### Extract te package name from debian/control
-my $pkgname = "";
-while (<CONTROL>) {
- if (/^Package: (.*)/) {
- ($pkgname = $1) =~ s/^octave-//;
- last;
- }
-}
-
-
-$pkgname ne ""
- or die "$prog:E: Cannot find package name in debian/control\n";
-
-### URL for package index and pacakge download
-my $pkgurl = "http://octave.sourceforge.net/packages.html";
-my $urlbase = "http://downloads.sourceforge.net/octave";
-
-### Get the package index
-open (PAGE, "curl --silent $pkgurl |");
-
-### Store URL of pacakges in a list
-my @PKGS = ();
-while (<PAGE>) {
- push (@PKGS, m{href="($urlbase/.*\.tar\.gz\?download)"}g)
-}
-
-### Extract the URL for the current package
-my $download = (grep {m {/$pkgname}} @PKGS) [0];
-
-$download ne ""
- or die "$prog:E: Tarball for $pkgname not found at SF site\n";
-
-### Extract the name of the tarball from the URL...
-(my $tarball = $download) =~ s/.*($pkgname-([\d.]+)\.tar\.gz).*/$1/;
-### ... as well as the version number
-my $version = $2;
-
-### Check whether the tarball is already download
-if (-f $tarball) {
- print "$prog:W: Tarball $tarball already downloaded\n";
-} else {
- ## Tarball needs to be downloaded
- system (qq {curl --location --silent --output $tarball "$download"}) == 0
- or die "$prog:E: Cannot download $tarball from SF site\n";
- print "$prog:I: Downloaded $tarball\n";
-}
-
-### Read the most recent version in debain/changelog
-my $debver;
-while (<CHGLOG>) {
- if (/\((.+)-.+\)/) {
- $debver = $1;
- last;
- }
-}
-
-### Warn the user whether the dowloaded version is diferent from that
-### in debian/changelog
-system ("dpkg --compare-versions $version lt $debver") != 0
- or print "$prog:W: Version in debian/changelog is lower than upstream\n";
-system ("dpkg --compare-versions $version gt $debver") != 0
- or print "$prog:W: Version in debian/changelog is higher than upstream\n";
More information about the Pkg-octave-commit
mailing list