From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 83C04138359 for ; Thu, 24 Sep 2020 14:19:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9DF13E07FE; Thu, 24 Sep 2020 14:19:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 75F08E07FE for ; Thu, 24 Sep 2020 14:19:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6161D340DA4 for ; Thu, 24 Sep 2020 14:19:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 157F9353 for ; Thu, 24 Sep 2020 14:19:51 +0000 (UTC) From: "Jeroen Roovers" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jeroen Roovers" Message-ID: <1600957188.818d3a2efc082bdcdf0977ed8c760caa3a2f24a2.jer@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/surfraw/ X-VCS-Repository: repo/gentoo X-VCS-Files: www-client/surfraw/surfraw-2.3.0-r3.ebuild www-client/surfraw/surfraw-99999.ebuild X-VCS-Directories: www-client/surfraw/ X-VCS-Committer: jer X-VCS-Committer-Name: Jeroen Roovers X-VCS-Revision: 818d3a2efc082bdcdf0977ed8c760caa3a2f24a2 X-VCS-Branch: master Date: Thu, 24 Sep 2020 14:19:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b65ab626-234b-4008-a3ac-b7e91d064ee0 X-Archives-Hash: 78ed386b50990d9d96a994c47185145a commit: 818d3a2efc082bdcdf0977ed8c760caa3a2f24a2 Author: Jeroen Roovers gentoo org> AuthorDate: Thu Sep 24 14:18:57 2020 +0000 Commit: Jeroen Roovers gentoo org> CommitDate: Thu Sep 24 14:19:48 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=818d3a2e www-client/surfraw: Decompress man pages and re-symlink them Package-Manager: Portage-3.0.8, Repoman-3.0.1 Closes: https://bugs.gentoo.org/732270 Signed-off-by: Jeroen Roovers gentoo.org> www-client/surfraw/surfraw-2.3.0-r3.ebuild | 105 +++++++++++++++++++++++++++++ www-client/surfraw/surfraw-99999.ebuild | 13 ++++ 2 files changed, 118 insertions(+) diff --git a/www-client/surfraw/surfraw-2.3.0-r3.ebuild b/www-client/surfraw/surfraw-2.3.0-r3.ebuild new file mode 100644 index 00000000000..afa5aad6b12 --- /dev/null +++ b/www-client/surfraw/surfraw-2.3.0-r3.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools bash-completion-r1 + +DESCRIPTION="A fast unix command line interface to WWW" +HOMEPAGE="https://gitlab.com/surfraw/Surfraw" +SRC_URI="https://gitlab.com/surfraw/Surfraw/-/archive/${P}/${PN^}-${P}.tar.bz2" +SLOT="0" +LICENSE="public-domain" +KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris" + +RDEPEND=" + dev-lang/perl +" +RESTRICT="test" +DOCS=( + AUTHORS ChangeLog HACKING NEWS README TODO +) +PATCHES=( + "${FILESDIR}"/${PN}-2.3.0-completion.patch +) +S=${WORKDIR}/${PN^}-${P} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf --with-elvidir='$(datadir)'/surfraw +} + +src_install() { + default + + local sr_man_page + for sr_man_page in $(find "${ED}" -lname surfraw.1.gz); do + ln -sf surfraw.1 "${sr_man_page/.gz}" || die + rm "${sr_man_page}" || die + done + for sr_man_page in $(find "${ED}" -lname elvi.1sr.gz); do + ln -sf elvi.1sr "${sr_man_page/.gz}" || die + rm "${sr_man_page}" || die + done + for sr_man_page in $(find -P "${ED}"/usr/share/man/man1/ -type f -name '*.gz'); do + gzip -d "${sr_man_page}" || die + done + + newbashcomp surfraw-bash-completion ${PN} + bashcomp_alias ${PN} sr + + docinto examples + dodoc examples/README examples/uzbl_load_url_from_surfraw +} + +pkg_preinst() { + has_version "=${CATEGORY}/${PN}-1.0.7" + upgrade_from_1_0_7=$? +} + +pkg_postinst() { + local moves f + + einfo + einfo "You can get a list of installed elvi by just typing 'surfraw' or" + einfo "the abbreviated 'sr'." + einfo + einfo "You can try some searches, for example:" + einfo "$ sr ask why is jeeves gay? " + einfo "$ sr google -results=100 RMS, GNU, which is sinner, which is sin?" + einfo "$ sr rhyme -method=perfect Julian" + einfo + einfo "The system configuration file is /etc/surfraw.conf" + einfo + einfo "Users can specify preferences in '~/.surfraw.conf' e.g." + einfo "SURFRAW_graphical_browser=mozilla" + einfo "SURFRAW_text_browser=w3m" + einfo "SURFRAW_graphical=no" + einfo + einfo "surfraw works with any graphical and/or text WWW browser" + einfo + if [[ $upgrade_from_1_0_7 = 0 ]] ; then + ewarn "surfraw usage has changed slightly since version 1.0.7, elvi are now called" + ewarn "using the 'sr' wrapper script as described above. If you wish to return to" + ewarn "the old behaviour you can add /usr/share/surfraw to your \$PATH" + fi + # This file was always autogenerated, and is no longer needed. + if [ -f "${EROOT}"/etc/surfraw_elvi.list ]; then + rm -f "${EROOT}"/etc/surfraw_elvi.list + fi + + # Config file location changes in v2.2.6 + for f in /etc/surfraw.{bookmarks,conf}; do + if [ -f "${EROOT}"${f} ]; then + ewarn "${f} has moved to /etc/xdg/config/surfraw/${f##*.} in v2.2.6." + moves=1 + fi + done + if [ "${moves}" == 1 ]; then + ewarn "You must manually move, and update, the config files listed" + ewarn "above for surfraw v2.2.6 and above to use them." + fi +} diff --git a/www-client/surfraw/surfraw-99999.ebuild b/www-client/surfraw/surfraw-99999.ebuild index 2ec87d0aa31..83703adf77d 100644 --- a/www-client/surfraw/surfraw-99999.ebuild +++ b/www-client/surfraw/surfraw-99999.ebuild @@ -38,6 +38,19 @@ src_configure() { src_install() { default + local sr_man_page + for sr_man_page in $(find "${ED}" -lname surfraw.1.gz); do + ln -sf surfraw.1 "${sr_man_page/.gz}" || die + rm "${sr_man_page}" || die + done + for sr_man_page in $(find "${ED}" -lname elvi.1sr.gz); do + ln -sf elvi.1sr "${sr_man_page/.gz}" || die + rm "${sr_man_page}" || die + done + for sr_man_page in $(find -P "${ED}"/usr/share/man/man1/ -type f -name '*.gz'); do + gzip -d "${sr_man_page}" || die + done + newbashcomp surfraw-bash-completion ${PN} bashcomp_alias ${PN} sr