From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Apr 15 15:20:08 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8B98C106564A for ; Sun, 15 Apr 2012 15:20:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 59D3B8FC18 for ; Sun, 15 Apr 2012 15:20:08 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q3FFK8rl072377 for ; Sun, 15 Apr 2012 15:20:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q3FFK8S0072376; Sun, 15 Apr 2012 15:20:08 GMT (envelope-from gnats) Resent-Date: Sun, 15 Apr 2012 15:20:08 GMT Resent-Message-Id: <201204151520.q3FFK8S0072376@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, nemysis Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B8191106566C for ; Sun, 15 Apr 2012 15:12:24 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 998828FC0C for ; Sun, 15 Apr 2012 15:12:24 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q3FFCOmT038967 for ; Sun, 15 Apr 2012 15:12:24 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q3FFCOIn038966; Sun, 15 Apr 2012 15:12:24 GMT (envelope-from nobody) Message-Id: <201204151512.q3FFCOIn038966@red.freebsd.org> Date: Sun, 15 Apr 2012 15:12:24 GMT From: nemysis To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/166966: A script to make light pkg-plist files for new FreeBSD Ports X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Apr 2012 15:20:08 -0000 >Number: 166966 >Category: ports >Synopsis: A script to make light pkg-plist files for new FreeBSD Ports >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Apr 15 15:20:08 UTC 2012 >Closed-Date: >Last-Modified: >Originator: nemysis >Release: 9.0-RELEASE FreeBSD 9.0-RELEASE #0 >Organization: >Environment: 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: A script to light make pkg-plist for new FreeBSD Ports. This is new and I adjust it when I make new FreeBSD Ports. >How-To-Repeat: >Fix: Patch attached with submission follows: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # freebsd-make-pkg-plist # echo x - freebsd-make-pkg-plist sed 's/^X//' >freebsd-make-pkg-plist << 'e9657aada85f3163eaacb8b9e1a3c311' X#!/usr/local/bin/bash X X# Author nemysis X Xecho "" Xecho "$0" Xecho "" X Xecho "" Xecho You are `whoami` Xecho"" Xecho "Start this as root!" Xecho "" X X# Without root no chance Xif(( $UID != 0 )); then Xecho "This script needs root privileges. Aborting now..." Xecho "" Xexit 1 Xfi X X Xrm -fr /var/tmp/ports X Xecho "" Xecho -n "Which Category would you use?" Xcd Xecho "" Xecho "" Xls /usr/local/ports/local/ Xecho "" Xread CATEGORY Xecho "" Xcd /usr/local/ports/local/$CATEGORY X Xecho -n "Which FreeBSD Port would you make?" Xcd Xecho "" Xecho "" Xls -l /usr/local/ports/local/$CATEGORY Xecho "" Xread PORTNAME X Xcd /usr/local/ports/local/$CATEGORY/$PORTNAME X Xecho "" Xecho "make makesum" Xmake makesum X Xecho "" Xecho "" Xecho "Check with portlint..." Xecho "" Xportlint X Xecho "" Xecho "" Xecho -n "Is all good with Makefile? (y,n)" Xecho "" Xecho "" Xread MAKEFILE Xif [ "${MAKEFILE}" = "Y" -o "${MAKEFILE}" = "y" ] X then X echo "" X echo "Good now make pkg-plist.." X echo "" X else X echo "" X echo "Please adjust Makefile and restart again script $0!" X exit 1 Xfi X Xecho "" Xmkdir /var/tmp/ports`make -V $PORTNAME` Xmtree -U -f `make -V MTREE_FILE` -d -e -p /var/tmp/ports`make -V $PORTNAME` Xmkdir /var/tmp/ports`make -V $PORTNAME`/share/applications Xmake depends PREFIX=/var/tmp/ports`make -V $PORTNAME` X Xmake install PREFIX=/var/tmp/ports`make -V $PORTNAME` X Xplist -Md -m `make -V MTREE_FILE` /var/tmp/ports`make -V $PORTNAME` > pkg-plist X X# Adjust what You don't wish to be in pkg-plist, attention... Xsed -i '' -e '/usr/d' pkg-plist Xsed -i '' -e "/share\/$PORTNAME/d" pkg-plist X#sed -i '' -e '/share\/applications/d' pkg-plist Xsed -i '' -e '/share\/doc/d' pkg-plist X#sed -i '' -e '/share\/icons/d' pkg-plist Xsed -i '' -e '/share\/licenses/d' pkg-plist Xsed -i '' -e '/dirrm share\/applications/d' pkg-plist Xsed -i '' -e '/dirrm share\/icons/d' pkg-plist X Xecho "" Xecho "Manualy look pkg-plist and adjust it if needed!" Xecho "" e9657aada85f3163eaacb8b9e1a3c311 exit >Release-Note: >Audit-Trail: >Unformatted: