# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit kde # NOTE: This program is to search magazine articles ONLY in GERMAN language! # If you don't know the german computer magazines c't and iX you don't need KHeiseReg. DESCRIPTION="A utility to search for articles within the Heise register (article database for the german computer magazines c't and iX)" HOMEPAGE="http://www.gantz-edv.de/kheisereg/" SRC_URI="http://www.gantz-edv.de/kheisereg/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64 ~ppc" IUSE="" need-kde 3 pkg_postinst() { einfo "You can download the latest Heise register now using:" echo einfo "# emerge --config =${PF}" echo einfo "After this import ${ROOT}tmp/kheisereg.tmp/register.zip in KHeiseReg." einfo "Thereafter you may delete the ${ROOT}tmp/kheisereg.tmp directory." echo einfo "Alternatively you can use the build-in download function of KHeiseReg" einfo "to download only specific registers of the c't and iX magazines -" einfo "for instance the ones you own ;-)" } pkg_config() { YJN=X while [ "${YJN}" = "X" ]; do einfo "[EN] Would you like to download the latest Heise register now? [Y/n]" einfo "[DE] Soll der aktuelle Heise-Register \"Grunddatenbestand\"" einfo " heruntergeladen werden? [J/n]" read YJN case ${YJN} in n | N) exit ;; *) YJN=Y ;; esac done if [ ! -d ${ROOT}tmp/kheisereg.tmp ]; then mkdir ${ROOT}tmp/kheisereg.tmp fi chown root:users ${ROOT}tmp/kheisereg.tmp chmod 775 ${ROOT}tmp/kheisereg.tmp echo einfo "Fetching register.zip..." wget --quiet -O ${ROOT}tmp/kheisereg.tmp/register.zip ftp://ftp.heise.de/pub/ct/register/register.zip if [ -s ${ROOT}tmp/kheisereg.tmp/register.zip ]; then chown root:users ${ROOT}tmp/kheisereg.tmp/register.zip chmod 664 ${ROOT}tmp/kheisereg.tmp/register.zip echo einfo "Status:" unzip -p ${ROOT}tmp/kheisereg.tmp/register.zip stand.txt | cat echo einfo "Now you can import ${ROOT}tmp/kheisereg.tmp/register.zip in KHeiseReg." einfo "As this import is user specific you have to do this for every user" einfo "who wants to work with KHeiseReg." echo einfo "Thereafter you may delete ${ROOT}tmp/kheisereg.tmp using:" echo einfo "# rm -dr ${ROOT}tmp/kheisereg.tmp" echo einfo "You can repeat this operation with:" echo einfo "# emerge --config =${PF}" else echo eerror "File could not be downloaded, sorry. The location of the required" eerror "file may have changed." echo fi }