[csw-devel] SF.net SVN: gar:[8042] csw/mgar/pkg/pcb/trunk

trygvis at users.sourceforge.net trygvis at users.sourceforge.net
Sun Jan 17 15:25:35 CET 2010


Revision: 8042
          http://gar.svn.sourceforge.net/gar/?rev=8042&view=rev
Author:   trygvis
Date:     2010-01-17 14:25:35 +0000 (Sun, 17 Jan 2010)

Log Message:
-----------
pcb: Adding pre and post scripts to properly handle the footprint library.

Modified Paths:
--------------
    csw/mgar/pkg/pcb/trunk/Makefile
    csw/mgar/pkg/pcb/trunk/checksums

Added Paths:
-----------
    csw/mgar/pkg/pcb/trunk/files/CSWpcb.postinstall
    csw/mgar/pkg/pcb/trunk/files/CSWpcb.preremove

Modified: csw/mgar/pkg/pcb/trunk/Makefile
===================================================================
--- csw/mgar/pkg/pcb/trunk/Makefile	2010-01-17 13:31:38 UTC (rev 8041)
+++ csw/mgar/pkg/pcb/trunk/Makefile	2010-01-17 14:25:35 UTC (rev 8042)
@@ -15,6 +15,8 @@
 SF_PROJ = $(GARNAME)
 MASTER_SITES = $(SF_MIRRORS)
 DISTFILES  = $(GARNAME)-$(GARVERSION).tar.gz
+DISTFILES += CSW$(GARNAME).postinstall
+DISTFILES += CSW$(GARNAME).preremove
 
 SPKG_SOURCEURL = http://pcb.gpleda.org
 
@@ -70,16 +72,15 @@
 
 include gar/category.mk
 
+PACKAGED_DIRECTORIES = newlib pcblib pcblib-newlib
+
 post-install-modulated:
 	@echo " ==> Packaging up lib/"
 	@echo " DESTDIR=" $(DESTDIR)
-	false
-	mkdir -p $(DESTDIR)/var/opt/csw/pcb/
-	gtar cf - -C $(DESTDIR)/lib . | gzip -c - > $(DESTDIR)/var/opt/csw/pcb/lib.tar.gz
-	rm -rf $(DESTDIR)/opt/csw/share/pcb/lib
-	false
-	@$(MAKECOOKIE)
-
-post-install-modulated:
+	@echo " PKGROOT=" $(PKGROOT)
+	gtar zcf $(DESTDIR)/opt/csw/share/pcb/lib.tar.gz \
+		-C $(DESTDIR)/opt/csw/share/pcb \
+		$(PACKAGED_DIRECTORIES)
+	(cd $(DESTDIR)/opt/csw/share/pcb; rm -rf $(PACKAGED_DIRECTORIES))
 	@rmdir $(DESTDIR)/opt/csw/share/pcb-20081128
 	@$(MAKECOOKIE)

Modified: csw/mgar/pkg/pcb/trunk/checksums
===================================================================
--- csw/mgar/pkg/pcb/trunk/checksums	2010-01-17 13:31:38 UTC (rev 8041)
+++ csw/mgar/pkg/pcb/trunk/checksums	2010-01-17 14:25:35 UTC (rev 8042)
@@ -1,3 +1,5 @@
 509826c8a9184b46055258861228b555  0001-Fix-off-by-one-error-in-the-GTK-HID-s-netlist-window.patch
 00fd904d4439493a998100f40891fffd  0001-Regenerate-rats-r-tree-when-re-allocating-a-bigger-r.patch
+19b4f08dc4fedfaf1388727463a4d344  CSWpcb.postinstall
+e4bcdb905fc698d3fdbf7449b495c774  CSWpcb.preremove
 e192ee993b04749f82dd3e8b529d40c0  pcb-20081128.tar.gz

Added: csw/mgar/pkg/pcb/trunk/files/CSWpcb.postinstall
===================================================================
--- csw/mgar/pkg/pcb/trunk/files/CSWpcb.postinstall	                        (rev 0)
+++ csw/mgar/pkg/pcb/trunk/files/CSWpcb.postinstall	2010-01-17 14:25:35 UTC (rev 8042)
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+PATH=/sbin:/usr/sbin:/opt/csw/sbin:/bin:/usr/bin:/opt/csw/bin
+
+if [ "$PKG_INSTALL_ROOT" = "" ]
+then
+  PKG_INSTALL_ROOT="/"
+fi
+
+echo "Installing footprint library..."
+cd $PKG_INSTALL_ROOT/opt/csw/share/pcb
+gzcat $PKG_INSTALL_ROOT/opt/csw/share/pcb/lib.tar.gz | tar xf -

Added: csw/mgar/pkg/pcb/trunk/files/CSWpcb.preremove
===================================================================
--- csw/mgar/pkg/pcb/trunk/files/CSWpcb.preremove	                        (rev 0)
+++ csw/mgar/pkg/pcb/trunk/files/CSWpcb.preremove	2010-01-17 14:25:35 UTC (rev 8042)
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+
+PATH=/sbin:/usr/sbin:/opt/csw/sbin:/bin:/usr/bin:/opt/csw/bin
+
+if [ "$PKG_INSTALL_ROOT" = "" ]
+then
+  PKG_INSTALL_ROOT="/"
+fi
+
+echo "Removing footprint library..."
+
+cd $PKG_INSTALL_ROOT/opt/csw/share/pcb
+gzcat $PKG_INSTALL_ROOT/opt/csw/share/pcb/lib.tar.gz | tar tf - | grep -v /$ | while read f
+do
+  rm "$PKG_INSTALL_ROOT/opt/csw/share/pcb/$f"
+done
+
+# Remove all directories in the tar file
+gzcat $PKG_INSTALL_ROOT/opt/csw/share/pcb/lib.tar.gz | tar tf - | grep /$ | sort -r | while read d
+do
+  rmdir "$d"
+done


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list