[csw-devel] SF.net SVN: gar:[14716] csw/mgar/pkg
theferret at users.sourceforge.net
theferret at users.sourceforge.net
Mon Jun 6 20:33:21 CEST 2011
Revision: 14716
http://gar.svn.sourceforge.net/gar/?rev=14716&view=rev
Author: theferret
Date: 2011-06-06 18:33:21 +0000 (Mon, 06 Jun 2011)
Log Message:
-----------
mbrowse: working build tree
Added Paths:
-----------
csw/mgar/pkg/mbrowse/
csw/mgar/pkg/mbrowse/trunk/
csw/mgar/pkg/mbrowse/trunk/Makefile
csw/mgar/pkg/mbrowse/trunk/copyright
csw/mgar/pkg/mbrowse/trunk/depend
csw/mgar/pkg/mbrowse/trunk/patchfile.preconf
csw/mgar/pkg/mbrowse/trunk/pkginfo
csw/mgar/pkg/mbrowse/trunk/prototype
Property changes on: csw/mgar/pkg/mbrowse/trunk
___________________________________________________________________
Added: svn:ignore
+ cookies
download
work
cswstage
build
Added: csw/mgar/pkg/mbrowse/trunk/Makefile
===================================================================
--- csw/mgar/pkg/mbrowse/trunk/Makefile (rev 0)
+++ csw/mgar/pkg/mbrowse/trunk/Makefile 2011-06-06 18:33:21 UTC (rev 14716)
@@ -0,0 +1,173 @@
+# This file is from TEMPLATES/createpkg/Makefile.lib32
+# You MUST build this with gnu make, unfortunately.
+# Mainly just because of the ARCH expansion, but also for "?="
+
+# Customize your prototype file(s) as needed
+
+# Organization: variable defintions up top,
+# targets in second half.
+# Note that assignments with "?=" mean "assign if not already assigned.
+
+# Where do we keep local downloads of software src files
+ARCHIVEDIR ?= /home/src
+ARCHIVENAME ?= mbrowse-0.4.3.tar.gz
+EXTRACTPROG ?= /usr/sfw/bin/gtar zfx
+
+# Only use ONE here. The name is used for compat with 'gar'.
+MASTER_SITES ?= http://sourceforge.net/projects/mbrowse/files/0.4.3/
+
+ARCH := $(shell /bin/uname -p)
+
+LDFLAGS_COMMON :=
+# mbrowse is unusual and requires this extra hack for configure
+EXTRA_LD_OPTIONS=-R/opt/csw/lib
+
+SRCDIR= build/*
+
+# DO NOT specify the arch-64 stuff such as -m64 here.
+# the individual targets will do that.
+
+CFLAGS_COMMON ?= -mt -xnorunpath -xO2
+CXXFLAGS_COMMON ?= -mt -norunpath -xO2
+CFLAGS_sparc ?= -xarch=v8
+CFLAGS_i386 ?= -xarch=386
+
+# Keep this arch-neutral if possible. add arch-specific tweaks
+# to arch-specific target
+CONFIGURE=./configure --prefix=/opt/csw --with-snmp-prefix=/opt/csw \
+ --with-snmp-type=net
+
+
+
+CREATEPKG=createpkg -r `pwd`/build/*/cswstage
+
+
+all: $(ARCH)-32
+#all: $(ARCH)-32 package
+
+# ARCH-XX handles configure, build, and stage for its own combo
+#
+
+EXTRACTPROG ?= /bin/echo ERROR: need to set EXTRACTPROG ; exit 1 ;
+
+
+
+extract: build/.extract.done
+
+build/.extract.done:
+ test -d build || mkdir build
+ @if test -f $(ARCHIVEDIR)/$(ARCHIVENAME) ; then \
+ echo Extracting $(ARCHIVENAME) under build dir... ;\
+ ( cd build && $(EXTRACTPROG) $(ARCHIVEDIR)/$(ARCHIVENAME) ) ; \
+ else echo Cannot extract - $(ARCHIVEDIR)/$(ARCHIVENAME) does not exist ;\
+ exit 1; \
+ fi
+ touch build/.extract.done
+
+
+clean distclean:
+ @echo Calling $@ in $(SRCDIR)
+ $(MAKE) -C $(SRCDIR) $@
+
+
+reallyclean: distclean
+ @echo Removing any milestone files in build as well...
+ @rm -f build/.??*
+ @echo '(However, leaving src tree intact, with any patches in it)'
+ @echo '(If you want, you could rm -r build, then make extract once more)'
+
+garchive:
+ @echo Call the fetch target instead: it does the same thing.
+
+
+# Downloads the source code to the common ARCHIVEDIR
+fetch: $(ARCHIVEDIR)/$(ARCHIVENAME)
+ @echo fetch done
+
+$(ARCHIVEDIR)/$(ARCHIVENAME):
+ wget -P $(ARCHIVEDIR) $(MASTER_SITES)/$(ARCHIVENAME)
+
+patch:
+ @echo patch: patching is handled automatically as part of the configure phase.
+
+stage-preserved:
+ @if test -f preserve-$(ARCH).tar ; then \
+ echo Copying preserved arch-specific files; \
+ cat preserve-$(ARCH).tar |(cd $(SRCDIR)/cswstage && tar xvf -);\
+ fi
+ @if test -f preserve.tar ; then \
+ echo Copying preserved arch-neutral files; \
+ cat preserve.tar |(cd $(SRCDIR)/cswstage && tar xvf -);\
+ fi
+
+package: stage-preserved
+ $(CREATEPKG)
+
+
+# split out generic $(ARCH) sections to platform-specific sections if needed.
+# but it usually should not be neccessary
+
+
+$(ARCH)-32 :: configure-$(ARCH)-32 build-$(ARCH)-32 stage-$(ARCH)-32
+ @echo Completed $(ARCH)-32 configure, build and stage
+ touch build/.$(ARCH)-32.done
+
+
+
+build/.$(ARCH)-32.done: $(ARCH)-32
+
+# Since we share the same src tree, we should only need to
+# pre-configure patching one time for all.
+build/.patch-preconf.done: build/.extract.done
+ if test -f patchfile.preconf ; then \
+ gpatch -d $(SRCDIR) -p0 <patchfile.preconf ; fi
+ touch $@
+
+
+#Note: I WANT to use LDFLAGS=-R$$ORIGIN, but stupid libtool
+# wont allow it! so force it at build time
+build/.configure-$(ARCH)-32.done: build/.patch-preconf.done
+ @echo handling $@ target
+ (cd $(SRCDIR) ; \
+ CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_$(ARCH))" \
+ CXXFLAGS="$(CXXFLAGS_COMMON)" \
+ LDFLAGS='-R/opt/csw/lib -L/opt/csw/lib' \
+ LD_OPTIONS=$(EXTRA_LD_OPTIONS) \
+ $(CONFIGURE) )
+ if test -f patchfile.postconf ; then \
+ gpatch -d $(SRCDIR) -p0 <patchfile.postconf ; fi
+ touch $@
+
+
+# See note about LDFLAGS and ORIGIN, higher up
+build/.build-$(ARCH)-32.done:
+ @echo handling $@ target
+ LD_OPTIONS='$(EXTRA_LD_OPTIONS)' $(MAKE) -C $(SRCDIR) $(MFLAGS)
+ touch $@
+
+
+
+## NOTE: This is a DESTRUCTIVE target build!!
+## 'stagepkg' will destroy any prior "cswstage" directory!!!
+## So, we remove all 64bit milestones
+build/.stage-$(ARCH)-32.done:
+ @echo Handling stage of $(ARCH)-32
+ (cd $(SRCDIR) ; MAKE=gmake stagepkg)
+ (cd $(SRCDIR); cp COPYING cswstage/.)
+ @rm -f build/.*64.done
+ touch $@
+
+
+
+#These are the easy-to-type targets. They just trigger the real ones.
+configure-$(ARCH)-32: build/.configure-$(ARCH)-32.done
+ @echo $@ done
+build-$(ARCH)-32: build/.build-$(ARCH)-32.done
+ @echo $@ done
+stage-$(ARCH)-32: build/.stage-$(ARCH)-32.done
+ @echo $@ done
+
+# manual targets
+pkgproto:
+ cat $(SRCDIR)/cswstage/prototype | sed 's/root root$$/root bin/'>prototype
+ @echo Dont forget to add a COPYING line !!
Added: csw/mgar/pkg/mbrowse/trunk/copyright
===================================================================
--- csw/mgar/pkg/mbrowse/trunk/copyright (rev 0)
+++ csw/mgar/pkg/mbrowse/trunk/copyright 2011-06-06 18:33:21 UTC (rev 14716)
@@ -0,0 +1,2 @@
+Please see /opt/csw/share/doc/mbrowse/COPYING for full copyright
+(GPL v2)
Added: csw/mgar/pkg/mbrowse/trunk/depend
===================================================================
--- csw/mgar/pkg/mbrowse/trunk/depend (rev 0)
+++ csw/mgar/pkg/mbrowse/trunk/depend 2011-06-06 18:33:21 UTC (rev 14716)
@@ -0,0 +1,5 @@
+P CSWcommon
+P CSWnetsnmp
+P CSWgtk
+P CSWglib
+P CSWosslrt
Added: csw/mgar/pkg/mbrowse/trunk/patchfile.preconf
===================================================================
--- csw/mgar/pkg/mbrowse/trunk/patchfile.preconf (rev 0)
+++ csw/mgar/pkg/mbrowse/trunk/patchfile.preconf 2011-06-06 18:33:21 UTC (rev 14716)
@@ -0,0 +1,43 @@
+--- src/configuration.c.orig 2011-06-03 23:40:45.658211970 +0200
++++ src/configuration.c 2011-06-06 19:44:12.974821626 +0200
+@@ -67,6 +67,9 @@
+ #define STRING 0
+ #define INTEGER 1
+
++#ifdef __SUNPRO_CCXX
++#define integer uint32_t
++#endif
+ config_opt_t config_opts[] = {
+ { "oid", STRING, {""}, &config.oid },
+ { "readcomm", STRING, {"public"}, &config.readcomm },
+@@ -74,18 +77,18 @@
+ { "host", STRING, {""}, &config.host },
+ { "inst", STRING, {""}, &config.inst },
+ { "value", STRING, {""}, &config.value },
+- { "save_sess", INTEGER,{integer:TRUE},&config.save_sess },
+- { "snmp_ver", INTEGER,{integer:SNMP_VERSION_1},&config.snmp_ver },
+- { "snmp_timeout", INTEGER,{integer:2},&config.snmp_timeout },
+- { "snmp_reties", INTEGER,{integer:1},&config.snmp_retries },
+- { "snmp_port", INTEGER,{integer:161},&config.snmp_port },
+- { "tree_line", INTEGER,{integer:1},&config.tree_line },
+- { "out_wrap_mode",INTEGER,{integer:GTK_WRAP_NONE},&config.out_wrap_mode },
+- { "save_window_size", INTEGER, {integer:1}, &config.save_window_size },
+- { "window_width", INTEGER, {integer:-1}, &config.window_width },
+- { "window_height", INTEGER, {integer:-1}, &config.window_height },
+- { "window_maximized", INTEGER, {integer:0}, &config.window_maximized },
+- { NULL, INTEGER, {integer:0},NULL },
++ { "save_sess", INTEGER,TRUE,&config.save_sess },
++ { "snmp_ver", INTEGER,{ SNMP_VERSION_1},&config.snmp_ver },
++ { "snmp_timeout", INTEGER,{ 2},&config.snmp_timeout },
++ { "snmp_reties", INTEGER,{ 1},&config.snmp_retries },
++ { "snmp_port", INTEGER,{ 161},&config.snmp_port },
++ { "tree_line", INTEGER,{ 1},&config.tree_line },
++ { "out_wrap_mode",INTEGER,{ GTK_WRAP_NONE},&config.out_wrap_mode },
++ { "save_window_size", INTEGER, { 1}, &config.save_window_size },
++ { "window_width", INTEGER, { -1}, &config.window_width },
++ { "window_height", INTEGER, { -1}, &config.window_height },
++ { "window_maximized", INTEGER, { 0}, &config.window_maximized },
++ { NULL, INTEGER, { 0},NULL },
+ };
+
+ config_t *get_config() {
Added: csw/mgar/pkg/mbrowse/trunk/pkginfo
===================================================================
--- csw/mgar/pkg/mbrowse/trunk/pkginfo (rev 0)
+++ csw/mgar/pkg/mbrowse/trunk/pkginfo 2011-06-06 18:33:21 UTC (rev 14716)
@@ -0,0 +1,8 @@
+PKG=CSWmbrowse
+NAME=mbrowse - SNMP MIB browser
+VERSION=0.4.3,REV=YYYY.MM.DD
+CATEGORY=application
+VENDOR=http://sourceforge.net/projects/mbrowse/ packaged for CSW by Philip Brown
+HOTLINE=http://www.opencsw.org/bugtrack/
+EMAIL=phil at opencsw.org
+OPENCSW_REPOSITORY=https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/mbrowse/trunk
Added: csw/mgar/pkg/mbrowse/trunk/prototype
===================================================================
--- csw/mgar/pkg/mbrowse/trunk/prototype (rev 0)
+++ csw/mgar/pkg/mbrowse/trunk/prototype 2011-06-06 18:33:21 UTC (rev 14716)
@@ -0,0 +1,7 @@
+i pkginfo
+i copyright
+i depend
+d none /opt/csw/bin 0755 root bin
+f none /opt/csw/bin/mbrowse 0755 root bin
+d none /opt/csw/share/doc/mbrowse 0755 root bin
+f none /opt/csw/share/doc/mbrowse/COPYING=COPYING 0755 root bin
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