From owner-freebsd-ports@freebsd.org Wed Jul 12 02:47:43 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 10D64DB13C7 for ; Wed, 12 Jul 2017 02:47:43 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (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 D0D75757E1 for ; Wed, 12 Jul 2017 02:47:42 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id q85so1312097pfq.2 for ; Tue, 11 Jul 2017 19:47:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:reply-to:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4HIZGpa79MTfvCIl/39KcQD8FUUDK+HUEQSO1jqJVuE=; b=oUQI9v3/q0vSXY1PHhQDwTUIjP7OeH/O1ByeANkWJOkqIu5YJxxReAzaPkFj+7gnj1 0BxVzNtIhq7J8Jsz5VjbU0Nk/wAo8r00lOOjxCKhxd93hNYTghh/6M6vEe0M3CKUpnaM LPt8E7eS+nUI6yZ+U3ssqXAex0QXOJaIb8N3AlNEVBr3IiY7HHVOxIybRnto6Ja2kS5Y gT/A5ejosE1go3AwVkSAN6MHXb6z835usCdL55PlTlkc0dKis5jy7QUaq/Iofk8OFTbO yurIXVVkI2UGzImGzkesDPO065fzlccMwCLkN2FKKlPO9/Wz/SIT3Eb14vS3m7ZOgCzV wJjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:subject:to:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=4HIZGpa79MTfvCIl/39KcQD8FUUDK+HUEQSO1jqJVuE=; b=Et3PpTzJ3da1dKjQ+WxGPtAOF9N0EExiRMsN0jE+GsOFJgxBX2TumqZg6ZDsf9LUBF yohVkKXHyzvd1WlIyAvSbuQnHhVydHJItJ5um24Q3n7nC0PH/ObuwR0Er2A3/PlwPBm1 FdILN+PH3kUylReQrQu9AeTF8g1HKBZA2DeHiATIPjlw3AUg8gcOzkfQ7fc/gLBqvXov dFLio2qsgOaur88XUXRW/dmDKXA7p4c9OevMDJ09UH60i5cgBBBM4mUlRoD1J0xRli8c ZkgmyQFK0wh3x2Hw5/obluM+ij6cmydCTR2H4+7ubFXaq7mOcm9tZGxgyQXtmVcUvfwn qbfw== X-Gm-Message-State: AIVw110o+lm/AmEp8g79b8jRPIkFGeC6cndGMuzhNDF52ytD85dFU0Ng PeKVRaLEgaHxzzflr+s= X-Received: by 10.99.63.206 with SMTP id m197mr1574875pga.170.1499827662133; Tue, 11 Jul 2017 19:47:42 -0700 (PDT) Received: from ?IPv6:2001:44b8:31ae:7b01:2042:3e8:d7ce:9b9c? (2001-44b8-31ae-7b01-2042-03e8-d7ce-9b9c.static.ipv6.internode.on.net. [2001:44b8:31ae:7b01:2042:3e8:d7ce:9b9c]) by smtp.gmail.com with ESMTPSA id z86sm1296100pfl.40.2017.07.11.19.47.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jul 2017 19:47:41 -0700 (PDT) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: Writing a port make deinstall To: blubee blubeeme , freebsd-ports@freebsd.org References: From: Kubilay Kocak Message-ID: <08c7851c-e145-76b9-db3a-6aba495d2f1c@FreeBSD.org> Date: Wed, 12 Jul 2017 12:42:31 +1000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Thunderbird/54.0a2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-AU Content-Transfer-Encoding: 7bit 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:47:43 -0000 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