From 2d166e2b6c652f29f75a826192594211b7cdc9f1 Mon Sep 17 00:00:00 2001
From: Vinicius Ruoso <vkr07@c3sl.ufpr.br>
Date: Thu, 13 May 2010 14:33:40 -0300
Subject: [PATCH] Created build-wget script

This script will be used to download, configure and compile wget(1).
The compilation process will automatically use static libraries.

The generated binary will be packed into ProinfoData package and will be
used when wget(1) isn't installed on the system.

Acked-by: Diego Giovane Pasqualin <dgp06@c3sl.ufpr.br>
Acked-by: Ricardo Tavares de Oliveira <rto07@c3sl.ufpr.br>
Signed-off-by: Vinicius Ruoso <vkr07@c3sl.ufpr.br>
---
 build-wget | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 71 insertions(+)
 create mode 100755 build-wget

diff --git a/build-wget b/build-wget
new file mode 100755
index 0000000..881cf5b
--- /dev/null
+++ b/build-wget
@@ -0,0 +1,71 @@
+#!/bin/bash
+# Copyright (C) 2004-2010 Centro de Computacao Cientifica e Software Livre
+# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
+#
+# This file is part of buildpackage
+#
+# buildpackage 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+
+
+PREFIX="$(dirname $0)"
+
+# Get the configuration
+if ! source "${PREFIX}/buildpackage.conf" 2>/dev/null; then
+    echo "error: failed to load buildpackage.conf"
+    exit 1
+fi
+
+# Customizable variables, please refer to
+# buildpackage.conf to change these values
+: ${GITBASEDIR:="../"}
+: ${GITUSER:="git"}
+: ${GITSERVER:="git.c3sl.ufpr.br"}
+: ${WEBSERVICE:="seed.c3sl.ufpr.br"}
+: ${AGENTDIR:="agent-files"}
+: ${AGENTPACKAGEDIR:="SEED2-run"}
+
+
+printf "====================\n"
+printf "$0 v0.1\n"
+printf "\n"
+printf "**** Make sure that you are connected to the internet!!!\n"
+printf "====================\n"
+printf "\n"
+
+# Remove old builds
+rm -Rf wget-*
+
+# Download the latest wget package
+wget http://gnu.c3sl.ufpr.br/ftp/wget/wget-latest.tar.gz -O wget.tar.gz || \
+  (printf "Error downloading the latest wget version... ABORTING!\n" && exit 1)
+
+# Unpack
+tar xvvf wget.tar.gz &>/dev/null || \
+  (printf "Error unpacking wget... ABORTING!\n" && exit 1)
+
+# Configure and compile
+cd wget-*
+./configure --without-ssl --disable-opie --disable-digest --disable-ntlm \
+            --disable-debug --disable-nls --disable-largefile \
+            --disable-ipv6 --disable-rpath --disable-iri || \
+  (printf "Error configuring wget... ABORTING!\n" && exit 1)
+
+make LDFLAGS=-static ||
+  (printf "Error compiling wget... ABORTING!\n" && exit 1)
+
+cd - &>/dev/null
+
+printf "All done.\n"
-- 
GitLab