diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-dialup/kpnadsl4linux | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-dialup/kpnadsl4linux')
-rw-r--r-- | net-dialup/kpnadsl4linux/Manifest | 1 | ||||
-rw-r--r-- | net-dialup/kpnadsl4linux/files/kpnadsl4linux-1.11-Makefile.patch | 25 | ||||
-rw-r--r-- | net-dialup/kpnadsl4linux/files/kpnadsl4linux-config | 100 | ||||
-rw-r--r-- | net-dialup/kpnadsl4linux/kpnadsl4linux-1.11.ebuild | 47 | ||||
-rw-r--r-- | net-dialup/kpnadsl4linux/metadata.xml | 5 |
5 files changed, 178 insertions, 0 deletions
diff --git a/net-dialup/kpnadsl4linux/Manifest b/net-dialup/kpnadsl4linux/Manifest new file mode 100644 index 000000000000..db567bd319f8 --- /dev/null +++ b/net-dialup/kpnadsl4linux/Manifest @@ -0,0 +1 @@ +DIST kpnadsl4linux-1.11.tar.gz 15068 SHA256 45be6dfd6c11a4327da622efd947c077bd04c8ae0f812731c9cd3bd9f992d7c3 SHA512 050c879aff115169e6cb0f0bf081a8172a3f4735f7231d1e5d1f245b34a1b522691e7640d146eac3c894a17c2901e59f1f942f7be5a2eed5ce1eb8c96bfef201 WHIRLPOOL ff8bd2d8db5490f1c1d5f47bf21f122c505851f2b48676745c17ba5573efbf5ec14f8a363608e6387ed782f92e411d9ec5afb54b4bb7ef6910ba27085ff55061 diff --git a/net-dialup/kpnadsl4linux/files/kpnadsl4linux-1.11-Makefile.patch b/net-dialup/kpnadsl4linux/files/kpnadsl4linux-1.11-Makefile.patch new file mode 100644 index 000000000000..f7d20bf348a6 --- /dev/null +++ b/net-dialup/kpnadsl4linux/files/kpnadsl4linux-1.11-Makefile.patch @@ -0,0 +1,25 @@ +--- Makefile.orig 2013-04-14 16:50:26.676698258 +0400 ++++ Makefile 2013-04-14 16:51:14.107695809 +0400 +@@ -1,18 +1,18 @@ + # Makefile for ADSL4Linux 1.11 Gentoo Edition + + all: adsl + + adsl: adsl.o adslstatus.o adslstatus.h adsl.h +- gcc adsl.o adslstatus.o -o adsl ++ $(CC) $(LDFLAGS) adsl.o adslstatus.o -o adsl + + adsl.o: adsl.c adsl.h +- gcc -c adsl.c ++ $(CC) $(CFLAGS) -c adsl.c + + adslstatus: adslstatus.o adslstatus.h adsl.h +- gcc adslstatus.o -o adslstatus ++ $(CC) $(LDFLAGS) adslstatus.o -o adslstatus + + adslstatus.o: adslstatus.c adslstatus.h adsl.h +- gcc -c adslstatus.c ++ $(CC) $(CFLAGS) -c adslstatus.c + + clean: + rm adsl *.o diff --git a/net-dialup/kpnadsl4linux/files/kpnadsl4linux-config b/net-dialup/kpnadsl4linux/files/kpnadsl4linux-config new file mode 100644 index 000000000000..439528e14f4a --- /dev/null +++ b/net-dialup/kpnadsl4linux/files/kpnadsl4linux-config @@ -0,0 +1,100 @@ +#/bin/bash + +# This script is to be distributed on the Gentoo liveCD's under the terms or the GNU General Public License version 2 or later +# Copyright 2002 Sam Besselink (sambesselink@planet.nl) +# This script does some configuration needed before it's possible to make a succesful pptp tunnel. + +a4lvarconfig() { + # Get username, password and 'phonenumber' (pc1/pc2/pc3/...) + echo "What's your username? (ie. myname@subscription-form)"; read USERNAME; + echo "" + echo "What's your password?"; read PAWD; + echo "" + echo "If you have a subscription with multiple ip addresses, please specify your 'pc-number'? (ie. pc3) Press"\ + "ENTER if you have no idea what I'm talking about."; read PCNUMBER; + echo "" + if [ -z ${PCNUMBER} ]; then PCNUMBER=pc1; else :; fi; + echo "Are these, in order, your username, password and pc-number?"; + echo "username: ${USERNAME}"; + echo "password: ${PAWD}"; + echo "pc-number: ${PCNUMBER}"; + # Ask whether settings are correct and act accordingly. + CHECK="Yes No"; + select CHCKCHCK in ${CHECK}; do + if [ ${CHCKCHCK} = "Yes" ]; + # Get username etc. again if last try was incorrect. + then adslconfigins; + # Else go to the next step. + else echo ""; echo ""; echo ""; a4lvarconfig; + fi + done +} + +adslconfigins() { + if [ -d /etc/ppp/peers ]; then :; else mkdir /etc/ppp/peers; fi + cd /etc/ppp/peers + + # Save your settings to a file. + echo "idle 0" > .adsl + echo "noauth" >> .adsl + echo "user ${USERNAME}" >> .adsl + echo "usepeerdns" >> .adsl + echo "defaultroute" >> .adsl + echo "linkname mxstream" >> .adsl + echo 'pty "/usr/sbin/pptp 10.0.0.138 --nolaunchpppd --phone '"${PCNUMBER}"'"' >> .adsl + if [ -e adsl ]; then mv .adsl ._cfg0000_adsl; else mv .adsl adsl; fi + chmod 644 adsl + pap-secretsins; +} + +pap-secretsins() { + if [ -d /etc/ppp/peers ]; then :; else mkdir /etc/ppp/peers; fi + cd /etc/ppp + # Save the 'secret' (password) in the secrets file. + echo "# Secrets for authentication using PAP" > .pap-secrets + echo "# client server secret ip-addresses" >> .pap-secrets + echo "${USERNAME} * "'"'"${PAWD}"'"'" *" >> .pap-secrets + if [ -e pap-secrets ]; then mv .pap-secrets ._cfg0000_pap-secrets; else mv .pap-secrets pap-secrets; fi + loggingadsl; +} + +loggingadsl() { + # Crontab Logging + echo "Trying to install logging..." + local TESTER="root test -x /usr/sbin/adsl && /usr/sbin/adsl update" + local STRING1="/5 * * * * ${TESTER}" + # Check if /etc/crontab exists + if [ -e /etc/crontab ]; then \ + # If cron works install, else don't. + if [ `grep -c "/5 \* \* \* \* ${TESTER}" /etc/crontab` != "0" ]; then echo "Not adding string for crontab"; + else echo -e '\n# 5-minute ADSL log update' >> /etc/crontab; + echo -e "${STRING1}" >> /etc/crontab; + echo "Added to crontab: a 5 minute log update"; + fi; + else echo "/etc/crontab doesn't exist!" + fi; + + # ip-down.local logging + local TEST="" + local TEST2="^/usr/sbin/adsl stoplog$" + local STRING2="/usr/sbin/adsl stoplog" + if [ -e /etc/ppp/ip-down.local ]; then :; else touch /etc/ppp/ip-down.local; fi + local test=`grep -c "${TEST2}" /etc/ppp/ip-down.local` + # If there already is such a string, don't do anything, else add it. + if [ "${TEST}" != "0" ]; then echo "Not adding string for log in /etc/ppp/ip-down.local"; + else echo -e '\n# ADSL log save' >> /etc/ppp/ip-down.local; + echo -e "${STRING2}" >> /etc/ppp/ip-down.local; + echo "Added to ip-down.local: log save"; + fi; + + echo "Configuration is done!" + echo "If you want you can check/tweak your settings by editting /etc/ppp/pap-secrets" + echo "and /etc/ppp/peers/adsl. Enjoy!" + echo -e "\e[33;01m* IMPORTANT:\e[00;00m files in /etc _MAY_ need updating."; + echo -e "\e[33;01m*\e[00;00m Type \e[32;01memerge --help config \e[00;00mto learn how to update config files."; + + exit; +} + +# Start the configuring +a4lvarconfig; diff --git a/net-dialup/kpnadsl4linux/kpnadsl4linux-1.11.ebuild b/net-dialup/kpnadsl4linux/kpnadsl4linux-1.11.ebuild new file mode 100644 index 000000000000..51d54d075eac --- /dev/null +++ b/net-dialup/kpnadsl4linux/kpnadsl4linux-1.11.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils toolchain-funcs + +DESCRIPTION="ADSL4Linux, a PPTP start/stop/etc. program especially for Dutch users" +HOMEPAGE="http://www.adsl4linux.nl/" +SRC_URI="http://home.planet.nl/~mcdon001/${P}.tar.gz + http://www.adsl4linux.nl/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc ppc64 x86" + +RDEPEND=">=net-dialup/pptpclient-1.7.0 + >=net-dialup/ppp-2.4.2" + +src_prepare() { + # Respect CC, CFLAGS and LDFLAGS. Bug #336109 + epatch "${FILESDIR}/${P}-Makefile.patch" + tc-export CC + + # Fix a typo + sed -i -e 's:* at first:/\0:' adslstatus.c || die 'sed on adslstatuc.c failed' + + epatch_user +} + +src_install() { + dosbin adsl + dodoc Changelog modemREADME README + newinitd init.d.adsl adsl + dosbin "${FILESDIR}/${PN}-config" +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]]; then + elog "Do _NOT_ forget to run the following if this is your _FIRST_ install:" + elog " kpnadsl4linux-config" + elog " etc-update" + elog "To start ${P} at boot type:" + elog " rc-update add adsl default" + fi +} diff --git a/net-dialup/kpnadsl4linux/metadata.xml b/net-dialup/kpnadsl4linux/metadata.xml new file mode 100644 index 000000000000..1e11e7bbd01b --- /dev/null +++ b/net-dialup/kpnadsl4linux/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>net-dialup</herd> +</pkgmetadata> |