From owner-freebsd-ports@freebsd.org Wed Jul 12 02:49:23 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5E64DB1457 for ; Wed, 12 Jul 2017 02:49:23 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: from mail-pg0-x232.google.com (mail-pg0-x232.google.com [IPv6:2607:f8b0:400e:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 86CDC758C0; Wed, 12 Jul 2017 02:49:23 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: by mail-pg0-x232.google.com with SMTP id u62so5412993pgb.3; Tue, 11 Jul 2017 19:49:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=AJXFXVZZv1fWMrn94uR/dm6XdHEATJwZARw5imbfsPI=; b=ac1dg4jBLsIvyM/kdLpSdCQ0JO7IzSOKcs5LQAtldxjDXGspHh377lga3zHvCKqCW0 UwKPUGiPftSbRaovtrgZCvCc1DkAlUM3WVnWEjmirSamK2a2krrrAX6uQ8SPOhmXiTXB gDAaiS8QZEPioyDXe69a5kwWwAACDZbFYq4v0uK9nxMLjBmbsGWB9oYvM5178UyniPMr EOYt6tv/6syWbBZsMnLc/peCHGeebnUsCbF914cc8ySFT7dXpE/9bDsPYfqNdGj9VPx2 sYNDb/v4WmmNwc9sinOsqjcOEt/gi87dRNj/Ce/v/TdhNOCjNJRRM9dhAgeIePGPcnvK giXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=AJXFXVZZv1fWMrn94uR/dm6XdHEATJwZARw5imbfsPI=; b=dMrDJ7xNGDJ7spQG0Ou2xeta7xmbop51BaOJcOpe6rGof83MtCfTR3FrfJVsdDoC02 FN/LzFyi1Ur+9yZ2otVxHcJh8nWJh9pgnK3nIve/gJgpQB0LLdPmQ+IQMk3rhQLUiUuu 4GZ1Zdr6+xuMQCAexq2L6hGmRNbEzzNyBXx00PkHvCd57ZuLBooUaRg9O5Q3nDSaCjm2 T8Avbjd9mgpSuJDA7FZEitGReXDvZNIcWiKdhEDJXHZFZkys7/gGSZ1URyUKnGC0B1Kd BZ4lpyZM4z4rCZ9j5KajNmOVu7IfK3iTsjQqIHLSlG9fChvJh08ODFlNXryAtu7CEkl5 LLvw== X-Gm-Message-State: AIVw112EGqFKVAq8PxbBz0VplyMcD1A/b8LnKzYgJKNy43PXwwSPP0uO MxJvDgwi2tNJe4ii6pGjchaLdSl9Cw== X-Received: by 10.84.139.129 with SMTP id 1mr1727286plr.12.1499827762909; Tue, 11 Jul 2017 19:49:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.165.137 with HTTP; Tue, 11 Jul 2017 19:49:22 -0700 (PDT) In-Reply-To: <08c7851c-e145-76b9-db3a-6aba495d2f1c@FreeBSD.org> References: <08c7851c-e145-76b9-db3a-6aba495d2f1c@FreeBSD.org> From: blubee blubeeme Date: Wed, 12 Jul 2017 10:49:22 +0800 Message-ID: Subject: Re: Writing a port make deinstall To: koobs@freebsd.org Cc: freebsd-ports@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jul 2017 02:49:23 -0000 Oh, Thank you both for the fast response. You'll definitely see me around these parts more often. Best, Owen On Wed, Jul 12, 2017 at 10:42 AM, Kubilay Kocak wrote: > On 7/12/17 12:38 PM, blubee blubeeme wrote: > > Hello FreeBSD ports team > > > > I am writing a Makefile to install a port > > > > I've written this much so far > > > > PORTNAME= epson-inkjet-printer-201401w > > PORTVERSION= 201401w > > PORTREVISION= 1 > > PORTEPOCH= 0 > > CATEGORIES= print > > MASTER_SITES= > > https://download3.ebz.epson.net/dsc/f/03/00/03/45/41/ > d95c03482376873661d7a8d4c165b385cd082cf3/:amd64 > > \ > > > > https://download3.ebz.epson.net/dsc/f/03/00/03/45/41/ > 0c527f1eef727e350302db951a45d31319ee501b/:i386 > > > > DISTFILES_amd64= > > epson-inkjet-printer-201401w-1.0.0-1lsb3.2.x86_64.rpm:amd64 > > DISTFILES_i386= epson-inkjet-printer-201401w- > 1.0.0-1lsb3.2.i486.rpm:i386 > > > > > > LICENSE= GPLv2 > > DIST_SUBDIR= ${PORTNAME}/${PORTVERSION} > > > > COMMENT= CUPS filter for Seiko Epson Color Ink Jet Printers > > > > RESTRICTED= GNU Lesser General Public License version 2.1. \ > > This program links the following object codes \ > > which are distributed under the conditions of \ > > SEIKO EPSON CORPORATION SOFTWARE LICENSE AGREEMENT. \ > > *libEpson_201401w.so.1.0.0 \ > > *libEpson_201401w.MT.so.1.0.0 > > > > > > NO_BUILD= yes > > NO_WRKSUBDIR= yes > > PLIST_SUB= LINUXBASE=${LINUXBASE} > > USES= linux > > USE_LINUX= cups-libs jpeg > > > > do-install: > > (gunzip ${WRKSRC}/opt/${PORTNAME}/ppds/Epson/*) > > (find ${WRKSRC}/opt/${PORTNAME}/ppds/Epson -type f -exec sed -i "" > > 's/\/opt\/epson/\/compat\/linux\/opt\/epson/g' {} \;) > > (cp -r ${WRKSRC}/opt/${PORTNAME} /compat/linux/opt/) > > (ln -s /compat/linux/opt/${PORTNAME}/ppds/Epson > > /usr/local/share/cups/model/) > > > > #cleanup? > > # rm -r /usr/local/share/cups/model/Epson > > # rm -r /compat/linux/opt/epson-inkjet-printer-201401w/ > > # rm -r ${WRKSRC} > > .include > > > > > > I don't know how to make the cleanup work. > > > > This Makefile passes works for installing the drivers and they work but > > doing > > > > make deinstall clean > > > > doesn't remove the files that I placed, the symlinks, etc. > > > > How do I properly write this Makefile so deinstall works as expected? > > > > Best, > > Owen > > Hi Owen, > > deinstall automatically works if and when all files/directories are > correctly referenced in the pkg-plist. Writing a deinstallation > procedure manually is not necessary. > > Porters Handbook: > > https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters- > handbook/book.html#porting-desc > > See Also: PLIST_FILES and other pkg-plist related entries > > Testing the port with poudriere and other tools will help you determine > what is not working, in particular which files were installed but not > referenced in the pkg-plist, and vice-versa. > > https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters- > handbook/testing.html > > For more help, there's also the #freebsd-ports IRC channel on freenode > > Hope that helps :) > > ./koobs > > > >