diff --git a/MAC/GCF/GCFCommon/GCFCommon.spec.in b/MAC/GCF/GCFCommon/GCFCommon.spec.in
new file mode 100644
index 0000000000000000000000000000000000000000..a52d85da10ae2f66fa54be6763f2dcdd61d7c7f4
--- /dev/null
+++ b/MAC/GCF/GCFCommon/GCFCommon.spec.in
@@ -0,0 +1,160 @@
+# -*- Mode:rpm-spec -*-
+# GCFCommon.spec.in
+#
+
+##############################################################################
+#
+# Preamble
+#
+##############################################################################
+
+Summary: GCFCommon is the common GCF software package providing a set of GCF wide type definitions.
+
+%define release @RPM_RELEASE@
+%define version @VERSION@
+%define pkgname @PACKAGE@
+%define pkgdir %{pkgname}-%{version}-%{release}
+%define prefix /opt/lofar
+%define configure_args @RPM_CONFIGURE_ARGS@
+##define build_kernel_version @BUILD_KERNEL_VERSION@
+
+Name: %{pkgname}
+Version: %{version}
+Release: %{release}
+Copyright: LGPL
+Group: Application/System
+Source: %{pkgname}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{pkgdir}-root
+URL: http://www.astron.nl
+Prefix: %{prefix}
+BuildArchitectures: i386 # Target platforms, i.e., i586
+Requires: Common 
+Packager: %{packager}
+Distribution: The LOFAR project
+Vendor: ASTRON
+
+AutoReqProv: no
+
+%description
+
+GCFCommon is the package handling the data transport in LOFAR.
+
+##############################################################################
+#
+# prep
+#
+##############################################################################
+%prep
+echo $prefix
+
+# create the build directory, untar the source
+%setup
+
+##############################################################################
+#
+# build
+#
+##############################################################################
+%build
+./configure %{configure_args} --prefix=%{prefix} && make
+
+##############################################################################
+#
+# install
+#
+##############################################################################
+%install
+# To make things work with BUILDROOT
+if [ "$RPM_BUILD_ROOT" != "%{_tmppath}/%{pkgdir}-root" ]
+then
+  echo
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo @                                                                    @
+  echo @  RPM_BUILD_ROOT is not what I expected.  Please clean it yourself. @
+  echo @                                                                    @
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo
+else
+  echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT"
+  rm -rf "$RPM_BUILD_ROOT"
+fi
+mkdir -p $RPM_BUILD_ROOT%{prefix}
+make DESTDIR="$RPM_BUILD_ROOT" install
+
+#uninstall
+
+##############################################################################
+#
+# verify
+#
+##############################################################################
+#verify
+
+##############################################################################
+#
+# clean
+#
+##############################################################################
+%clean
+# Call me paranoid, but I do not want to be responsible for nuking
+# someone's harddrive!
+if [ "$RPM_BUILD_ROOT" != "%{_tmppath}/%{pkgdir}-root" ]
+then
+  echo
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo @                                                                    @
+  echo @  RPM_BUILD_ROOT is not what I expected.  Please clean it yourself. @
+  echo @                                                                    @
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo
+else
+  echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT"
+  rm -rf "$RPM_BUILD_ROOT"
+fi
+
+##############################################################################
+#
+# files
+#
+##############################################################################
+
+# empty 'files' means all distributed files
+%files
+%defattr(-, root, root)
+%{prefix}
+
+# Your application file list goes here
+# %{prefix}/lib/lib*.so*
+
+# Documentation
+# doc COPYING ChangeLog README AUTHORS NEWS
+# doc doc/*
+
+# link the module to the correct path
+%post 
+
+# before uninstall
+%preun
+
+# after uninstall
+%postun
+
+##############################################################################
+#
+# package devel
+#
+##############################################################################
+
+#package devel
+#Summary: Development files for %{pkgname}
+#Group: Applications/System
+#description devel
+#Development files for %{pkgname}.
+
+#files devel
+
+# Your development files go here
+# Programmers documentation goes here
+#doc doc
+
+# end of file
diff --git a/MAC/GCF/GCFCommon/Makefile.am b/MAC/GCF/GCFCommon/Makefile.am
index a014c15b3e0cc91454edade91ee05c7b57830868..85eaccfa0b6e2351dcf49965488fd9e87a5426d4 100644
--- a/MAC/GCF/GCFCommon/Makefile.am
+++ b/MAC/GCF/GCFCommon/Makefile.am
@@ -1,3 +1,11 @@
-SUBDIRS=src
+SUBDIRS=src include pvss
+
+DISTCHECK_CONFIGURE_FLAGS=\
+      --with-common=$(prefix)
+
+EXTRA_DIST = \
+      Makefile.common \
+      GCFCommon.spec \
+      autoconf_share/compiletool
 
 include $(top_srcdir)/Makefile.common
diff --git a/MAC/GCF/GCFCommon/configure.in b/MAC/GCF/GCFCommon/configure.in
index 10384329d769af90d9fd49c317933a0442db6399..2aed4a9259a87cb5c0f13f6c6ef29ffb34a9b4da 100644
--- a/MAC/GCF/GCFCommon/configure.in
+++ b/MAC/GCF/GCFCommon/configure.in
@@ -5,7 +5,7 @@ AC_INIT(include/GCF/GCF_Defines.h)
 dnl AC_CONFIG_AUX_DIR(config)
 dnl AM_CONFIG_HEADER(config/config.h)
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(GCFCommon, 6.0)
+AM_INIT_AUTOMAKE(GCFCommon, 6.0, no-define)
 
 dnl Initialize for LOFAR (may set compilers)
 lofar_INIT
@@ -23,19 +23,6 @@ AC_PROG_LIBTOOL
 
 dnl Checks for libraries.
 
-dnl dnl Replace `main' with a function in -lfl:
-dnl AC_CHECK_LIB(fl, main)
-dnl dnl Replace `main' with a function in -lcosev_r:
-dnl AC_CHECK_LIB(cosev_r, main)
-dnl dnl Replace `main' with a function in -lcosnm_r:
-dnl AC_CHECK_LIB(cosnm_r, main)
-dnl dnl Replace `main' with a function in -lorb_r:
-dnl AC_CHECK_LIB(orb_r, main)
-dnl dnl Replace `main' with a function in -lpthread:
-dnl AC_CHECK_LIB(pthread, main)
-dnl dnl Replace `main' with a function in -lvport_r:
-dnl AC_CHECK_LIB(vport_r, main)
-
 dnl Checks for header files.
 AC_HEADER_STDC
 AC_CHECK_HEADERS(unistd.h)
@@ -51,8 +38,6 @@ dnl
 dnl Check for LOFAR specific things
 dnl
 lofar_GENERAL
-#lofar_QT
-lofar_MPI(0)
 lofar_INTERNAL(LCS/Common, Common, LCS-Common-2_3, 1, Common/LofarTypes.h,,)
 
 dnl
@@ -60,5 +45,10 @@ dnl Output Makefiles
 dnl
 AC_OUTPUT(
 src/Makefile
+include/Makefile
+include/GCF/Makefile
+pvss/Makefile
+pvss/scripts/libs/Makefile
 Makefile
+GCFCommon.spec
 )
diff --git a/MAC/GCF/GCFCommon/include/GCF/Makefile.am b/MAC/GCF/GCFCommon/include/GCF/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..95a66379bee3b2456511d291323ee035451b9524
--- /dev/null
+++ b/MAC/GCF/GCFCommon/include/GCF/Makefile.am
@@ -0,0 +1,32 @@
+INSTHDRS =
+
+pkgincludedir = $(includedir)/GCF
+pkginclude_HEADERS = \
+	GCF_PValue.h \
+	GCF_PVChar.h \
+	GCF_PVBool.h \
+	GCF_PVDouble.h \
+	GCF_PVString.h \
+	GCF_PVInteger.h \
+	GCF_PVUnsigned.h \
+	GCF_PVDynArr.h \
+	GCF_PVBlob.h \
+	CmdLine.h \
+	Utils.h \
+	GCF_Defines.h \
+	ParameterSet.h \
+	Thread.h \
+	Mutex.h
+
+NOINSTHDRS =
+
+TCCHDRS = 
+
+nobase_pkginclude_HEADERS = $(INSTHDRS) $(TCCHDRS)
+
+noinst_HEADERS = $(NOINSTHDRS)
+
+DOCHDRS	= $(INSTHDRS) $(NOINSTHDRS)
+
+include $(top_srcdir)/Makefile.common
+
diff --git a/MAC/GCF/GCFCommon/include/Makefile.am b/MAC/GCF/GCFCommon/include/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..eb27ea4dbf1fab7f2625b30e3bec3e378866d755
--- /dev/null
+++ b/MAC/GCF/GCFCommon/include/Makefile.am
@@ -0,0 +1,3 @@
+SUBDIRS	= GCF
+
+include $(top_srcdir)/Makefile.common
diff --git a/MAC/GCF/GCFCommon/pvss/Makefile.am b/MAC/GCF/GCFCommon/pvss/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..4db09088aa2974ecb2620f1f9b88de5927a52c85
--- /dev/null
+++ b/MAC/GCF/GCFCommon/pvss/Makefile.am
@@ -0,0 +1,3 @@
+SUBDIRS=scripts/libs
+
+include $(top_srcdir)/Makefile.common
diff --git a/MAC/GCF/GCFCommon/pvss/scripts/libs/Makefile.am b/MAC/GCF/GCFCommon/pvss/scripts/libs/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..57a9effdbf0f926284acd0f3e47eec487312fbfa
--- /dev/null
+++ b/MAC/GCF/GCFCommon/pvss/scripts/libs/Makefile.am
@@ -0,0 +1,7 @@
+pkgdatadir = $(datadir)/pvss/scripts/libs
+pkgdata_DATA = gcf-common.ctl
+
+EXTRA_DIST = $(pkgdata_DATA)
+
+include $(top_srcdir)/Makefile.common
+
diff --git a/MAC/GCF/GCFCommon/src/Makefile.am b/MAC/GCF/GCFCommon/src/Makefile.am
index 68173a08da75d46b3480247ebe870cda23486be8..fdbb4d98561914587c56d969a2fa7c79952c8bad 100644
--- a/MAC/GCF/GCFCommon/src/Makefile.am
+++ b/MAC/GCF/GCFCommon/src/Makefile.am
@@ -1,25 +1,9 @@
-pkgincludedir = $(includedir)/GCF
-pkginclude_HEADERS = \
-	../include/GCF/GCF_PValue.h \
-	../include/GCF/GCF_PVChar.h \
-	../include/GCF/GCF_PVBool.h \
-	../include/GCF/GCF_PVDouble.h \
-	../include/GCF/GCF_PVString.h \
-	../include/GCF/GCF_PVInteger.h \
-	../include/GCF/GCF_PVUnsigned.h \
-	../include/GCF/GCF_PVDynArr.h \
-	../include/GCF/GCF_PVBlob.h \
-	../include/GCF/CmdLine.h \
-	../include/GCF/Utils.h \
-	../include/GCF/GCF_Defines.h \
-	../include/GCF/ParameterSet.h \
-	../include/GCF/Thread.h \
-	../include/GCF/Mutex.h
-
-DOCHDRS	=	$(pkginclude_HEADERS)
+DOCHDRS	=	GCO_Defines.h
       
 lib_LTLIBRARIES 	= libgcfcommon.la
 
+libgcfcommon_la_DEPENDENCIES	= $(LOFAR_DEPEND)
+
 libgcfcommon_la_SOURCES= $(DOCHDRS) \
 	CmdLine.cc \
 	Utils.cc \
@@ -35,7 +19,5 @@ libgcfcommon_la_SOURCES= $(DOCHDRS) \
 	ParameterSet.cc \
 	Thread.cc
 	
-libgcfcommon_la_CPPFLAGS=-I$(top_srcdir)/include
-
 include $(top_srcdir)/Makefile.common
 
diff --git a/MAC/GCF/LogSys/CLP/src/Makefile.am b/MAC/GCF/LogSys/CLP/src/Makefile.am
index 00f49f68d342dc9e3f3fa16f53650c77949c48e5..790948c3041d87433f6b89954dc476db5df7acdf 100644
--- a/MAC/GCF/LogSys/CLP/src/Makefile.am
+++ b/MAC/GCF/LogSys/CLP/src/Makefile.am
@@ -1,7 +1,4 @@
-pkgincludedir = $(includedir)/GCF/LogSys
-pkginclude_HEADERS =
-	
-DOCHDRS	=	$(pkginclude_HEADERS) \
+DOCHDRS	=	\
 	CodeLoggingProcessor.h \
 	PropertyProxy.h
    
@@ -12,9 +9,7 @@ libclp_la_SOURCES	= $(DOCHDRS) \
 	PropertyProxy.cc
 
 libclp_la_LIBADD		= 
-libclp_la_CPPFLAGS= -DLOFARLOGGER_SUBPACKAGE=\"CLP\" \
-	-I$(top_srcdir)/include
-
+AM_CPPFLAGS= -DLOFARLOGGER_SUBPACKAGE=\"CLP\"
 
 bin_PROGRAMS   		= CodeLoggingProcessor
   
@@ -23,11 +18,12 @@ CodeLoggingProcessor_LDADD		    = libclp.la $(LOFAR_DEPEND) \
 	$(top_builddir)/KVLogSys/src/libgcfkvlc.la
 CodeLoggingProcessor_DEPENDENCIES	= libclp.la $(LOFAR_DEPEND) \
 	$(top_builddir)/KVLogSys/src/libgcfkvlc.la
-CodeLoggingProcessor_CPPFLAGS			= $(libclp_la_CPPFLAGS)
 
 BUILT_SOURCES =
 
-EXTRA_DIST = $(BUILT_SOURCES)
+EXTRA_DIST = $(BUILT_SOURCES) \
+	CodeLoggingProcessor.conf.in \
+	CodeLoggingProcessor.log_prop.in
 
 sysconf_DATA= \
 	CodeLoggingProcessor.conf \
diff --git a/MAC/GCF/LogSys/GCFLogSys.spec.in b/MAC/GCF/LogSys/GCFLogSys.spec.in
new file mode 100644
index 0000000000000000000000000000000000000000..d1eb87252680d89cf93037aa1bd7c7e5ad203b88
--- /dev/null
+++ b/MAC/GCF/LogSys/GCFLogSys.spec.in
@@ -0,0 +1,160 @@
+# -*- Mode:rpm-spec -*-
+# GCFLogSys.spec.in
+#
+
+##############################################################################
+#
+# Preamble
+#
+##############################################################################
+
+Summary: GCFLogSys is the common GCF software package providing a set of GCF wide type definitions.
+
+%define release @RPM_RELEASE@
+%define version @VERSION@
+%define pkgname @PACKAGE@
+%define pkgdir %{pkgname}-%{version}-%{release}
+%define prefix /opt/lofar
+%define configure_args @RPM_CONFIGURE_ARGS@
+##define build_kernel_version @BUILD_KERNEL_VERSION@
+
+Name: %{pkgname}
+Version: %{version}
+Release: %{release}
+Copyright: LGPL
+Group: Application/System
+Source: %{pkgname}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{pkgdir}-root
+URL: http://www.astron.nl
+Prefix: %{prefix}
+BuildArchitectures: i386 # Target platforms, i.e., i586
+Requires: Common, GCFCommon, GCFTM, GCFProtocols, GCFPAL
+Packager: %{packager}
+Distribution: The LOFAR project
+Vendor: ASTRON
+
+AutoReqProv: no
+
+%description
+
+GCFLogSys is the package handling the data transport in LOFAR.
+
+##############################################################################
+#
+# prep
+#
+##############################################################################
+%prep
+echo $prefix
+
+# create the build directory, untar the source
+%setup
+
+##############################################################################
+#
+# build
+#
+##############################################################################
+%build
+./configure %{configure_args} --prefix=%{prefix} && make
+
+##############################################################################
+#
+# install
+#
+##############################################################################
+%install
+# To make things work with BUILDROOT
+if [ "$RPM_BUILD_ROOT" != "%{_tmppath}/%{pkgdir}-root" ]
+then
+  echo
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo @                                                                    @
+  echo @  RPM_BUILD_ROOT is not what I expected.  Please clean it yourself. @
+  echo @                                                                    @
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo
+else
+  echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT"
+  rm -rf "$RPM_BUILD_ROOT"
+fi
+mkdir -p $RPM_BUILD_ROOT%{prefix}
+make DESTDIR="$RPM_BUILD_ROOT" install
+
+#uninstall
+
+##############################################################################
+#
+# verify
+#
+##############################################################################
+#verify
+
+##############################################################################
+#
+# clean
+#
+##############################################################################
+%clean
+# Call me paranoid, but I do not want to be responsible for nuking
+# someone's harddrive!
+if [ "$RPM_BUILD_ROOT" != "%{_tmppath}/%{pkgdir}-root" ]
+then
+  echo
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo @                                                                    @
+  echo @  RPM_BUILD_ROOT is not what I expected.  Please clean it yourself. @
+  echo @                                                                    @
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo
+else
+  echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT"
+  rm -rf "$RPM_BUILD_ROOT"
+fi
+
+##############################################################################
+#
+# files
+#
+##############################################################################
+
+# empty 'files' means all distributed files
+%files
+%defattr(-, root, root)
+%{prefix}
+
+# Your application file list goes here
+# %{prefix}/lib/lib*.so*
+
+# Documentation
+# doc COPYING ChangeLog README AUTHORS NEWS
+# doc doc/*
+
+# link the module to the correct path
+%post 
+
+# before uninstall
+%preun
+
+# after uninstall
+%postun
+
+##############################################################################
+#
+# package devel
+#
+##############################################################################
+
+#package devel
+#Summary: Development files for %{pkgname}
+#Group: Applications/System
+#description devel
+#Development files for %{pkgname}.
+
+#files devel
+
+# Your development files go here
+# Programmers documentation goes here
+#doc doc
+
+# end of file
diff --git a/MAC/GCF/LogSys/KVLogSys/src/Makefile.am b/MAC/GCF/LogSys/KVLogSys/src/Makefile.am
index 53a91874772fd74f4d36775c89cbceda41b054f9..ee2c4f56edce3a70b0a0df1aa9f6fc69687221d9 100644
--- a/MAC/GCF/LogSys/KVLogSys/src/Makefile.am
+++ b/MAC/GCF/LogSys/KVLogSys/src/Makefile.am
@@ -4,12 +4,8 @@ SUFFIXES = .ph
 %.ph: %.prot
 	$(AUTOGEN) --writable -L $(datadir)/GCF/TM $<
 
-pkgincludedir = $(includedir)/GCF/LogSys
-pkginclude_HEADERS = \
-	../../include/GCF/LogSys/GCF_KeyValueLogger.h
-	
-DOCHDRS	=	$(pkginclude_HEADERS) \
-	KVDefines.h \
+DOCHDRS	=	\
+	KVLDefines.h \
 	KeyValueLoggerDaemon.h \
 	KeyValueLoggerMaster.h \
 	KVLUtils.h \
@@ -23,15 +19,15 @@ libgcfkvlc_la_SOURCES= $(DOCHDRS) \
 	
 libgcfkvlc_la_LIBADD= libkvlprot.la
 libgcfkvlc_la_DEPENDENCIES= libkvlprot.la $(LOFAR_DEPEND)
-libgcfkvlc_la_CPPFLAGS= -I$(top_srcdir)/include \
-	-DLOFARLOGGER_SUBPACKAGE=\"KVLC\"
+libgcfkvlc_la_CPPFLAGS= -DLOFARLOGGER_SUBPACKAGE=\"KVLC\"
 
+bin_PROGRAMS   		= KeyValueLoggerDaemon KeyValueLoggerMaster
 noinst_LTLIBRARIES 	= libkvlprot.la libkvld.la libkvlm.la
 
 libkvlprot_la_SOURCES= $(DOCHDRS) \
   KVL_Protocol.cc \
   KVLUtils.cc
-
+  
 libkvld_la_SOURCES	= $(DOCHDRS) \
 	KeyValueLoggerDaemon.cc \
 	PropertyLogger.cc
@@ -39,28 +35,28 @@ libkvld_la_SOURCES	= $(DOCHDRS) \
 libkvld_la_LIBADD		= libkvlprot.la
 libkvld_la_CPPFLAGS= -DLOFARLOGGER_SUBPACKAGE=\"KVLD\"
 
+KeyValueLoggerDaemon_SOURCES		  = KVLDMain.cc
+KeyValueLoggerDaemon_LDADD		    = libkvld.la $(LOFAR_DEPEND)
+KeyValueLoggerDaemon_DEPENDENCIES	= libkvld.la $(LOFAR_DEPEND)
+KeyValueLoggerDaemon_CPPFLAGS			= $(libkvld_la_CPPFLAGS)
+
 libkvlm_la_SOURCES	= $(DOCHDRS) \
 	KeyValueLoggerMaster.cc
 
 libkvlm_la_LIBADD		= libkvlprot.la
 libkvlm_la_CPPFLAGS= -DLOFARLOGGER_SUBPACKAGE=\"KVLM\"
 
-bin_PROGRAMS   		= KeyValueLoggerDaemon KeyValueLoggerMaster
-  
-KeyValueLoggerDaemon_SOURCES		  = KVLDMain.cc
-KeyValueLoggerDaemon_LDADD		    = libkvld.la $(LOFAR_DEPEND)
-KeyValueLoggerDaemon_DEPENDENCIES	= libkvld.la $(LOFAR_DEPEND)
-KeyValueLoggerDaemon_CPPFLAGS			= -DLOFARLOGGER_SUBPACKAGE=\"KVLD\"
-
 KeyValueLoggerMaster_SOURCES		  = KVLMMain.cc
 KeyValueLoggerMaster_LDADD		    = libkvlm.la $(LOFAR_DEPEND)
 KeyValueLoggerMaster_DEPENDENCIES	= libkvlm.la $(LOFAR_DEPEND)
-KeyValueLoggerMaster_CPPFLAGS			= -DLOFARLOGGER_SUBPACKAGE=\"KVLM\"
+KeyValueLoggerMaster_CPPFLAGS			= $(libkvlm_la_CPPFLAGS)
 
 BUILT_SOURCES = \
 	KVL_Protocol.ph
 
-EXTRA_DIST = $(BUILT_SOURCES)
+EXTRA_DIST = $(BUILT_SOURCES) \
+	KeyValueLoggerSys.conf.in \
+	KeyValueLoggerSys.log_prop.in
 	
 sysconf_DATA= \
 	KeyValueLoggerDaemon.conf \
diff --git a/MAC/GCF/LogSys/Makefile.am b/MAC/GCF/LogSys/Makefile.am
index cf7c4caa7dab04c61e5c082193badb6c731dd77e..f51b089b887b9a40f83339a109c55f88ec76ea55 100644
--- a/MAC/GCF/LogSys/Makefile.am
+++ b/MAC/GCF/LogSys/Makefile.am
@@ -1,3 +1,11 @@
-SUBDIRS=KVLogSys CLP
+SUBDIRS=KVLogSys CLP include
+
+DISTCHECK_CONFIGURE_FLAGS=\
+      --with-common=$(prefix)
+
+EXTRA_DIST = \
+      Makefile.common \
+      GCFLogSys.spec \
+      autoconf_share/compiletool
 
 include $(top_srcdir)/Makefile.common
diff --git a/MAC/GCF/LogSys/configure.in b/MAC/GCF/LogSys/configure.in
index ecc16ccd83091960e27dbd48d3a6a95ae2503531..10d15dcb5ae7f38760013dfe2f6a74e69c7bd18d 100644
--- a/MAC/GCF/LogSys/configure.in
+++ b/MAC/GCF/LogSys/configure.in
@@ -2,10 +2,8 @@ dnl
 dnl Process this file with autoconf to produce a configure script.
 dnl
 AC_INIT(include/GCF/LogSys/GCF_KeyValueLogger.h)
-dnl AC_CONFIG_AUX_DIR(config)
-dnl AM_CONFIG_HEADER(config/config.h)
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(GCF/LogSys, 6.0)
+AM_INIT_AUTOMAKE(GCFLogSys, 6.0, no-define)
 
 dnl Initialize for LOFAR (may set compilers)
 lofar_INIT
@@ -38,7 +36,6 @@ dnl
 dnl Check for LOFAR specific things
 dnl
 lofar_GENERAL
-#lofar_QT
 lofar_PVSS
 lofar_INTERNAL(LCS/Common, common, LCS-Common-2_3, 1, Common/LofarTypes.h,,)
 lofar_INTERNAL(MAC/GCF/GCFCommon, gcfcommon, MAC-GCF-6_0, 1, GCF/GCF_Defines.h,,)
@@ -56,5 +53,8 @@ KVLogSys/src/Makefile
 KVLogSys/Makefile
 CLP/src/Makefile
 CLP/Makefile
+include/Makefile
+include/GCF/LogSys/Makefile
 Makefile
+GCFLogSys.spec
 )
diff --git a/MAC/GCF/LogSys/include/GCF/LogSys/Makefile.am b/MAC/GCF/LogSys/include/GCF/LogSys/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..1e2e18e800b40aab262d9cbd88e3c9ed40e5d593
--- /dev/null
+++ b/MAC/GCF/LogSys/include/GCF/LogSys/Makefile.am
@@ -0,0 +1,17 @@
+INSTHDRS =
+
+pkgincludedir = $(includedir)/GCF/LogSys
+pkginclude_HEADERS = \
+	GCF_KeyValueLogger.h
+	
+NOINSTHDRS =
+
+TCCHDRS = 
+
+nobase_pkginclude_HEADERS = $(INSTHDRS) $(TCCHDRS)
+
+noinst_HEADERS = $(NOINSTHDRS)
+
+DOCHDRS	= $(INSTHDRS) $(NOINSTHDRS)
+
+include $(top_srcdir)/Makefile.common
diff --git a/MAC/GCF/LogSys/include/Makefile.am b/MAC/GCF/LogSys/include/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..f1b5b81990c822f8391c0354b3e2b889df1b3fda
--- /dev/null
+++ b/MAC/GCF/LogSys/include/Makefile.am
@@ -0,0 +1,3 @@
+SUBDIRS	= GCF/LogSys
+
+include $(top_srcdir)/Makefile.common
diff --git a/MAC/GCF/Protocols/GCFProtocols.spec.in b/MAC/GCF/Protocols/GCFProtocols.spec.in
new file mode 100644
index 0000000000000000000000000000000000000000..963b4b27952621f6f2ecee8c4fd74fa6f1a8d202
--- /dev/null
+++ b/MAC/GCF/Protocols/GCFProtocols.spec.in
@@ -0,0 +1,160 @@
+# -*- Mode:rpm-spec -*-
+# GCFProtocols.spec.in
+#
+
+##############################################################################
+#
+# Preamble
+#
+##############################################################################
+
+Summary: GCFProtocols is the common GCF software package providing a set of GCF wide type definitions.
+
+%define release @RPM_RELEASE@
+%define version @VERSION@
+%define pkgname @PACKAGE@
+%define pkgdir %{pkgname}-%{version}-%{release}
+%define prefix /opt/lofar
+%define configure_args @RPM_CONFIGURE_ARGS@
+##define build_kernel_version @BUILD_KERNEL_VERSION@
+
+Name: %{pkgname}
+Version: %{version}
+Release: %{release}
+Copyright: LGPL
+Group: Application/System
+Source: %{pkgname}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{pkgdir}-root
+URL: http://www.astron.nl
+Prefix: %{prefix}
+BuildArchitectures: i386 # Target platforms, i.e., i586
+Requires: Common, GCFCommon, GCFTM, Transport 
+Packager: %{packager}
+Distribution: The LOFAR project
+Vendor: ASTRON
+
+AutoReqProv: no
+
+%description
+
+GCFProtocols is the package handling the data transport in LOFAR.
+
+##############################################################################
+#
+# prep
+#
+##############################################################################
+%prep
+echo $prefix
+
+# create the build directory, untar the source
+%setup
+
+##############################################################################
+#
+# build
+#
+##############################################################################
+%build
+./configure %{configure_args} --prefix=%{prefix} && make
+
+##############################################################################
+#
+# install
+#
+##############################################################################
+%install
+# To make things work with BUILDROOT
+if [ "$RPM_BUILD_ROOT" != "%{_tmppath}/%{pkgdir}-root" ]
+then
+  echo
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo @                                                                    @
+  echo @  RPM_BUILD_ROOT is not what I expected.  Please clean it yourself. @
+  echo @                                                                    @
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo
+else
+  echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT"
+  rm -rf "$RPM_BUILD_ROOT"
+fi
+mkdir -p $RPM_BUILD_ROOT%{prefix}
+make DESTDIR="$RPM_BUILD_ROOT" install
+
+#uninstall
+
+##############################################################################
+#
+# verify
+#
+##############################################################################
+#verify
+
+##############################################################################
+#
+# clean
+#
+##############################################################################
+%clean
+# Call me paranoid, but I do not want to be responsible for nuking
+# someone's harddrive!
+if [ "$RPM_BUILD_ROOT" != "%{_tmppath}/%{pkgdir}-root" ]
+then
+  echo
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo @                                                                    @
+  echo @  RPM_BUILD_ROOT is not what I expected.  Please clean it yourself. @
+  echo @                                                                    @
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo
+else
+  echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT"
+  rm -rf "$RPM_BUILD_ROOT"
+fi
+
+##############################################################################
+#
+# files
+#
+##############################################################################
+
+# empty 'files' means all distributed files
+%files
+%defattr(-, root, root)
+%{prefix}
+
+# Your application file list goes here
+# %{prefix}/lib/lib*.so*
+
+# Documentation
+# doc COPYING ChangeLog README AUTHORS NEWS
+# doc doc/*
+
+# link the module to the correct path
+%post 
+
+# before uninstall
+%preun
+
+# after uninstall
+%postun
+
+##############################################################################
+#
+# package devel
+#
+##############################################################################
+
+#package devel
+#Summary: Development files for %{pkgname}
+#Group: Applications/System
+#description devel
+#Development files for %{pkgname}.
+
+#files devel
+
+# Your development files go here
+# Programmers documentation goes here
+#doc doc
+
+# end of file
diff --git a/MAC/GCF/Protocols/Makefile.am b/MAC/GCF/Protocols/Makefile.am
index a014c15b3e0cc91454edade91ee05c7b57830868..513a3598e5d7406780195a3efbc2fd8a2a08f13e 100644
--- a/MAC/GCF/Protocols/Makefile.am
+++ b/MAC/GCF/Protocols/Makefile.am
@@ -1,3 +1,12 @@
 SUBDIRS=src
 
+DISTCHECK_CONFIGURE_FLAGS=\
+      --with-common=$(prefix)
+
+EXTRA_DIST = \
+      Makefile.common \
+      GCFProtocols.spec \
+      autoconf_share/compiletool
+
+
 include $(top_srcdir)/Makefile.common
diff --git a/MAC/GCF/Protocols/configure.in b/MAC/GCF/Protocols/configure.in
index a2e45f5f860a0e9829538cce4a990e3932a0688b..7553121fc93552be83e92e99dd99550f43c1639c 100644
--- a/MAC/GCF/Protocols/configure.in
+++ b/MAC/GCF/Protocols/configure.in
@@ -2,10 +2,8 @@ dnl
 dnl Process this file with autoconf to produce a configure script.
 dnl
 AC_INIT(src/DH_PIProtocol.h)
-dnl AC_CONFIG_AUX_DIR(config)
-dnl AM_CONFIG_HEADER(config/config.h)
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(GCF/Protocols, 6.0)
+AM_INIT_AUTOMAKE(GCFProtocols, 6.0, no-define)
 
 dnl Initialize for LOFAR (may set compilers)
 lofar_INIT
@@ -23,18 +21,6 @@ AC_PROG_LIBTOOL
 
 dnl Checks for libraries.
 
-dnl dnl Replace `main' with a function in -lfl:
-dnl AC_CHECK_LIB(fl, main)
-dnl dnl Replace `main' with a function in -lcosev_r:
-dnl AC_CHECK_LIB(cosev_r, main)
-dnl dnl Replace `main' with a function in -lcosnm_r:
-dnl AC_CHECK_LIB(cosnm_r, main)
-dnl dnl Replace `main' with a function in -lorb_r:
-dnl AC_CHECK_LIB(orb_r, main)
-dnl dnl Replace `main' with a function in -lpthread:
-dnl AC_CHECK_LIB(pthread, main)
-dnl dnl Replace `main' with a function in -lvport_r:
-dnl AC_CHECK_LIB(vport_r, main)
 
 dnl Checks for header files.
 AC_HEADER_STDC
@@ -51,7 +37,6 @@ dnl
 dnl Check for LOFAR specific things
 dnl
 lofar_GENERAL
-#lofar_QT
 lofar_INTERNAL(LCS/Common, Common, LCS-Common-2_3, 1,Common/LofarTypes.h,,)
 lofar_INTERNAL(LCS/Transport, transport, LCS-Transport-2_1, 1, Transport/DataHolder.h,,)
 lofar_INTERNAL(MAC/GCF/GCFCommon, GCFCommon, MAC-GCF-6_0, 1,GCF/GCF_Defines.h,,)
@@ -63,4 +48,5 @@ dnl
 AC_OUTPUT(
 src/Makefile
 Makefile
+GCFProtocols.spec
 )
diff --git a/MAC/GCF/TM/GCFTM.spec.in b/MAC/GCF/TM/GCFTM.spec.in
new file mode 100644
index 0000000000000000000000000000000000000000..8be2ac5815fde142cf10121e1db0ea5cbf229ab0
--- /dev/null
+++ b/MAC/GCF/TM/GCFTM.spec.in
@@ -0,0 +1,160 @@
+# -*- Mode:rpm-spec -*-
+# GCFTM.spec.in
+#
+
+##############################################################################
+#
+# Preamble
+#
+##############################################################################
+
+Summary: GCFTM is the common GCF software package providing a set of GCF wide type definitions.
+
+%define release @RPM_RELEASE@
+%define version @VERSION@
+%define pkgname @PACKAGE@
+%define pkgdir %{pkgname}-%{version}-%{release}
+%define prefix /opt/lofar
+%define configure_args @RPM_CONFIGURE_ARGS@
+##define build_kernel_version @BUILD_KERNEL_VERSION@
+
+Name: %{pkgname}
+Version: %{version}
+Release: %{release}
+Copyright: LGPL
+Group: Application/System
+Source: %{pkgname}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{pkgdir}-root
+URL: http://www.astron.nl
+Prefix: %{prefix}
+BuildArchitectures: i386 # Target platforms, i.e., i586
+Requires: Common, GCFCommon 
+Packager: %{packager}
+Distribution: The LOFAR project
+Vendor: ASTRON
+
+AutoReqProv: no
+
+%description
+
+GCFTM is the package handling the data transport in LOFAR.
+
+##############################################################################
+#
+# prep
+#
+##############################################################################
+%prep
+echo $prefix
+
+# create the build directory, untar the source
+%setup
+
+##############################################################################
+#
+# build
+#
+##############################################################################
+%build
+./configure %{configure_args} --prefix=%{prefix} && make
+
+##############################################################################
+#
+# install
+#
+##############################################################################
+%install
+# To make things work with BUILDROOT
+if [ "$RPM_BUILD_ROOT" != "%{_tmppath}/%{pkgdir}-root" ]
+then
+  echo
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo @                                                                    @
+  echo @  RPM_BUILD_ROOT is not what I expected.  Please clean it yourself. @
+  echo @                                                                    @
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo
+else
+  echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT"
+  rm -rf "$RPM_BUILD_ROOT"
+fi
+mkdir -p $RPM_BUILD_ROOT%{prefix}
+make DESTDIR="$RPM_BUILD_ROOT" install
+
+#uninstall
+
+##############################################################################
+#
+# verify
+#
+##############################################################################
+#verify
+
+##############################################################################
+#
+# clean
+#
+##############################################################################
+%clean
+# Call me paranoid, but I do not want to be responsible for nuking
+# someone's harddrive!
+if [ "$RPM_BUILD_ROOT" != "%{_tmppath}/%{pkgdir}-root" ]
+then
+  echo
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo @                                                                    @
+  echo @  RPM_BUILD_ROOT is not what I expected.  Please clean it yourself. @
+  echo @                                                                    @
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo
+else
+  echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT"
+  rm -rf "$RPM_BUILD_ROOT"
+fi
+
+##############################################################################
+#
+# files
+#
+##############################################################################
+
+# empty 'files' means all distributed files
+%files
+%defattr(-, root, root)
+%{prefix}
+
+# Your application file list goes here
+# %{prefix}/lib/lib*.so*
+
+# Documentation
+# doc COPYING ChangeLog README AUTHORS NEWS
+# doc doc/*
+
+# link the module to the correct path
+%post 
+
+# before uninstall
+%preun
+
+# after uninstall
+%postun
+
+##############################################################################
+#
+# package devel
+#
+##############################################################################
+
+#package devel
+#Summary: Development files for %{pkgname}
+#Group: Applications/System
+#description devel
+#Development files for %{pkgname}.
+
+#files devel
+
+# Your development files go here
+# Programmers documentation goes here
+#doc doc
+
+# end of file
diff --git a/MAC/GCF/TM/Makefile.am b/MAC/GCF/TM/Makefile.am
index f8ee60a3d5c42f84f00420cba2d1c2f44cae05b7..ba3651a681e7f6d5c67cac5bdba0fbd48f14f7ed 100644
--- a/MAC/GCF/TM/Makefile.am
+++ b/MAC/GCF/TM/Makefile.am
@@ -1,3 +1,11 @@
-SUBDIRS=autogen src test
+SUBDIRS=autogen src test include
+
+DISTCHECK_CONFIGURE_FLAGS=\
+      --with-common=$(prefix)
+
+EXTRA_DIST = \
+      Makefile.common \
+      GCFTM.spec \
+      autoconf_share/compiletool
 
 include $(top_srcdir)/Makefile.common
diff --git a/MAC/GCF/TM/autogen/Makefile.am b/MAC/GCF/TM/autogen/Makefile.am
index 7deea39982eebd2cb2a0348c583e5a867d2340a1..6ead8de346a2371fc9d16bc712491a9c1b6f4098 100644
--- a/MAC/GCF/TM/autogen/Makefile.am
+++ b/MAC/GCF/TM/autogen/Makefile.am
@@ -1,4 +1,7 @@
+pkgdatadir = $(datadir)/GCF/TM
 pkgdata_DATA = protocol.tpl
 
+EXTRA_DIST = $(pkgdata_DATA)
+
 include $(top_srcdir)/Makefile.common
 
diff --git a/MAC/GCF/TM/configure.in b/MAC/GCF/TM/configure.in
index d12d7b45ddd4f531e1f1207f748fa7da5476aa44..e10735cf971e057ee22490037be1ec1e8451f39b 100644
--- a/MAC/GCF/TM/configure.in
+++ b/MAC/GCF/TM/configure.in
@@ -2,10 +2,8 @@ dnl
 dnl Process this file with autoconf to produce a configure script.
 dnl
 AC_INIT(include/GCF/TM/GCF_Event.h)
-dnl AC_CONFIG_AUX_DIR(config)
-dnl AM_CONFIG_HEADER(config/config.h)
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(GCF/TM, 6.0)
+AM_INIT_AUTOMAKE(GCFTM, 6.0, no-define)
 
 dnl Initialize for LOFAR (may set compilers)
 lofar_INIT
@@ -23,19 +21,6 @@ AC_PROG_LIBTOOL
 
 dnl Checks for libraries.
 
-dnl dnl Replace `main' with a function in -lfl:
-dnl AC_CHECK_LIB(fl, main)
-dnl dnl Replace `main' with a function in -lcosev_r:
-dnl AC_CHECK_LIB(cosev_r, main)
-dnl dnl Replace `main' with a function in -lcosnm_r:
-dnl AC_CHECK_LIB(cosnm_r, main)
-dnl dnl Replace `main' with a function in -lorb_r:
-dnl AC_CHECK_LIB(orb_r, main)
-dnl dnl Replace `main' with a function in -lpthread:
-dnl AC_CHECK_LIB(pthread, main)
-dnl dnl Replace `main' with a function in -lvport_r:
-dnl AC_CHECK_LIB(vport_r, main)
-
 dnl Checks for header files.
 AC_HEADER_STDC
 AC_CHECK_HEADERS(unistd.h)
@@ -51,10 +36,8 @@ dnl
 dnl Check for LOFAR specific things
 dnl
 lofar_GENERAL
-#lofar_QT
-lofar_MPI(0)
 lofar_INTERNAL(LCS/Common, Common, LCS-Common-2_3, 1, Common/LofarTypes.h,,)
-lofar_INTERNAL(MAC/GCF/GCFCommon, GCFCommon, MAC-GCF-6_0, 1, GCF/GCF_Defines.h,,)
+lofar_INTERNAL(MAC/GCF/GCFCommon, GCFCommon, MAC-GCF-6_1, 1, GCF/GCF_Defines.h,,)
 
 dnl
 dnl Output Makefiles
@@ -64,5 +47,8 @@ autogen/Makefile
 src/Makefile
 src/ServiceBroker/Makefile
 test/Makefile
+include/Makefile
+include/GCF/TM/Makefile
 Makefile
+GCFTM.spec
 )
diff --git a/MAC/GCF/TM/include/GCF/TM/Makefile.am b/MAC/GCF/TM/include/GCF/TM/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..fe62175cbbd5aace46a530187fefa0cff4df0cd9
--- /dev/null
+++ b/MAC/GCF/TM/include/GCF/TM/Makefile.am
@@ -0,0 +1,29 @@
+INSTHDRS =
+
+pkgincludedir = $(includedir)/GCF/TM
+pkginclude_HEADERS = \
+	GCF_ETHRawPort.h \
+	GCF_TCPPort.h \
+	GCF_RawPort.h \
+	GCF_Port.h \
+	GCF_PortInterface.h \
+	GCF_Event.h \
+	GCF_Protocols.h \
+	GCF_Task.h \
+	GCF_Handler.h \
+	GCF_Fsm.h \
+	GCF_Control.h \
+	GCF_DevicePort.h
+
+NOINSTHDRS =
+
+TCCHDRS = 
+
+nobase_pkginclude_HEADERS = $(INSTHDRS) $(TCCHDRS)
+
+noinst_HEADERS = $(NOINSTHDRS)
+
+DOCHDRS	= $(INSTHDRS) $(NOINSTHDRS)
+
+include $(top_srcdir)/Makefile.common
+
diff --git a/MAC/GCF/TM/include/Makefile.am b/MAC/GCF/TM/include/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..d759e2f287f4e650c7fd29402c90773800e89d7d
--- /dev/null
+++ b/MAC/GCF/TM/include/Makefile.am
@@ -0,0 +1,3 @@
+SUBDIRS	= GCF/TM
+
+include $(top_srcdir)/Makefile.common
diff --git a/MAC/GCF/TM/src/Makefile.am b/MAC/GCF/TM/src/Makefile.am
index 4755e1ed1c3699d45a9354a1ff238167caf156bb..7a231df48a91cbad8e1d56ddb2b8e52d9ce8b80c 100644
--- a/MAC/GCF/TM/src/Makefile.am
+++ b/MAC/GCF/TM/src/Makefile.am
@@ -5,22 +5,7 @@ SUFFIXES = .ph
 %.ph: ServiceBroker/%.prot
 	$(AUTOGEN) --writable -L $(top_srcdir)/autogen $<
 
-pkgincludedir = $(includedir)/GCF/TM
-pkginclude_HEADERS = \
-	../include/GCF/TM/GCF_ETHRawPort.h \
-	../include/GCF/TM/GCF_TCPPort.h \
-	../include/GCF/TM/GCF_RawPort.h \
-	../include/GCF/TM/GCF_Port.h \
-	../include/GCF/TM/GCF_PortInterface.h \
-	../include/GCF/TM/GCF_Event.h \
-	../include/GCF/TM/GCF_Protocols.h \
-	../include/GCF/TM/GCF_Task.h \
-	../include/GCF/TM/GCF_Handler.h \
-	../include/GCF/TM/GCF_Fsm.h \
-	../include/GCF/TM/GCF_Control.h \
-	../include/GCF/TM/GCF_DevicePort.h
- 
-DOCHDRS = $(pkginclude_HEADERS) \
+DOCHDRS = \
   GTM_Defines.h \
   Timer/GTM_Timer.h \
   Timer/GTM_TimerHandler.h \
@@ -57,15 +42,14 @@ libgcftm_la_SOURCES= $(DOCHDRS) \
   ServiceBroker/GTM_ServiceBroker.cc \
 	SB_Protocol.cc
 
-libgcftm_la_CPPFLAGS=-I$(top_srcdir)/include \
-	-I$(top_srcdir)/src/ServiceBroker
+libgcftm_la_CPPFLAGS=-I$(top_srcdir)/src/ServiceBroker
 
 libgcftm_la_CXXFLAGS=-fmessage-length=0
 
 BUILT_SOURCES =  \
 	SB_Protocol.ph
 
-EXTRA_DIST = $(BUILT_SOURCES)
+EXTRA_DIST = $(BUILT_SOURCES) mac.log_prop.in
 	
 sysconf_DATA = \
 	mac.log_prop
diff --git a/MAC/GCF/TM/src/ServiceBroker/Makefile.am b/MAC/GCF/TM/src/ServiceBroker/Makefile.am
index d42d80d6bb81839100c8c5ce641015cbaf50a2e5..bc5dfa6307409b7bd7731077f6f3df2ef612d106 100644
--- a/MAC/GCF/TM/src/ServiceBroker/Makefile.am
+++ b/MAC/GCF/TM/src/ServiceBroker/Makefile.am
@@ -7,7 +7,6 @@ noinst_LTLIBRARIES 	= libsb.la
 libsb_la_SOURCES= $(DOCHDRS) \
 	GSB_Controller.cc
 	
-libsb_la_CPPFLAGS= -I$(top_srcdir)/include
 libsb_la_CXXFLAGS=-fmessage-length=0
 
 bin_PROGRAMS   		= ServiceBroker
@@ -19,19 +18,18 @@ ServiceBroker_LDADD		     		= libsb.la $(LOFAR_DEPEND) \
 ServiceBroker_DEPENDENCIES	= libsb.la $(LOFAR_DEPEND) \
 	$(top_builddir)/src/libgcftm.la
 	
-ServiceBroker_CPPFLAGS= -I$(top_srcdir)/include
 ServiceBroker_CXXFLAGS=-fmessage-length=0
 
 BUILT_SOURCES = 
 
-EXTRA_DIST = $(BUILT_SOURCES)
+EXTRA_DIST = $(BUILT_SOURCES) gcf-sb.conf.in
 
 sysconf_DATA= \
 	ServiceBroker.conf
 
 install-data-local:
-	echo "mac.gcf.sb.host=`hostname -s`" >> $(sysconfdir)/ServiceBroker.conf
-	echo "mac.gcf.sb.range1.host=`hostname`" >> $(sysconfdir)/ServiceBroker.conf
+	echo "mac.gcf.sb.host=`hostname -s`" >> $(DESTDIR)$(sysconfdir)/ServiceBroker.conf
+	echo "mac.gcf.sb.range1.host=`hostname`" >> $(DESTDIR)$(sysconfdir)/ServiceBroker.conf
 	
 %.conf: gcf-sb.conf.in
 	cp $< $@
diff --git a/MAC/GCF/TM/test/Makefile.am b/MAC/GCF/TM/test/Makefile.am
index 9ec6d1595ff6631f70d4c9e4aee0d608ee6787f9..41c78fce38a4582427fc7e95da1e963442f3c891 100644
--- a/MAC/GCF/TM/test/Makefile.am
+++ b/MAC/GCF/TM/test/Makefile.am
@@ -1,11 +1,11 @@
 bin_PROGRAMS 		= tmEcho tmPing
 
-tmEcho_SOURCES 		= Echo.cc Echo_Protocol.cc
+tmEcho_SOURCES 		= Echo.cc Echo_Protocol.cc Echo.h
 tmEcho_LDADD		= ../src/libgcftm.la
 tmEcho_DEPENDENCIES	= ../src/libgcftm.la $(LOFAR_DEPEND)
 tmEcho_CPPFLAGS=-I$(top_srcdir)/include
 
-tmPing_SOURCES 		= Ping.cc Echo_Protocol.cc
+tmPing_SOURCES 		= Ping.cc Echo_Protocol.cc Ping.h
 tmPing_LDADD		= ../src/libgcftm.la
 tmPing_DEPENDENCIES	= ../src/libgcftm.la $(LOFAR_DEPEND)
 tmPing_CPPFLAGS=-I$(top_srcdir)/include
@@ -18,8 +18,7 @@ SUFFIXES = .ph
 BUILT_SOURCES = \
 	Echo_Protocol.ph
 
-EXTRA_DIST = \
-	Echo_Protocol.ph
+EXTRA_DIST = $(BUILT_SOURCES) tm-test.conf.in
 
 sysconf_DATA=\
 	tmEcho.conf \
diff --git a/MAC/GCF/_PAL/GCFPAL.spec.in b/MAC/GCF/_PAL/GCFPAL.spec.in
new file mode 100644
index 0000000000000000000000000000000000000000..e043d385456f76a4f46b2a6f327c1f4fe05bf762
--- /dev/null
+++ b/MAC/GCF/_PAL/GCFPAL.spec.in
@@ -0,0 +1,160 @@
+# -*- Mode:rpm-spec -*-
+# GCFPAL.spec.in
+#
+
+##############################################################################
+#
+# Preamble
+#
+##############################################################################
+
+Summary: GCFPAL is the common GCF software package providing a set of GCF wide type definitions.
+
+%define release @RPM_RELEASE@
+%define version @VERSION@
+%define pkgname @PACKAGE@
+%define pkgdir %{pkgname}-%{version}-%{release}
+%define prefix /opt/lofar
+%define configure_args @RPM_CONFIGURE_ARGS@
+##define build_kernel_version @BUILD_KERNEL_VERSION@
+
+Name: %{pkgname}
+Version: %{version}
+Release: %{release}
+Copyright: LGPL
+Group: Application/System
+Source: %{pkgname}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{pkgdir}-root
+URL: http://www.astron.nl
+Prefix: %{prefix}
+BuildArchitectures: i386 # Target platforms, i.e., i586
+Requires: Common, GCFCommon, GCFTM, GCFProtocols
+Packager: %{packager}
+Distribution: The LOFAR project
+Vendor: ASTRON
+
+AutoReqProv: no
+
+%description
+
+GCFPAL is the package handling the data transport in LOFAR.
+
+##############################################################################
+#
+# prep
+#
+##############################################################################
+%prep
+echo $prefix
+
+# create the build directory, untar the source
+%setup
+
+##############################################################################
+#
+# build
+#
+##############################################################################
+%build
+./configure %{configure_args} --prefix=%{prefix} && make
+
+##############################################################################
+#
+# install
+#
+##############################################################################
+%install
+# To make things work with BUILDROOT
+if [ "$RPM_BUILD_ROOT" != "%{_tmppath}/%{pkgdir}-root" ]
+then
+  echo
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo @                                                                    @
+  echo @  RPM_BUILD_ROOT is not what I expected.  Please clean it yourself. @
+  echo @                                                                    @
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo
+else
+  echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT"
+  rm -rf "$RPM_BUILD_ROOT"
+fi
+mkdir -p $RPM_BUILD_ROOT%{prefix}
+make DESTDIR="$RPM_BUILD_ROOT" install
+
+#uninstall
+
+##############################################################################
+#
+# verify
+#
+##############################################################################
+#verify
+
+##############################################################################
+#
+# clean
+#
+##############################################################################
+%clean
+# Call me paranoid, but I do not want to be responsible for nuking
+# someone's harddrive!
+if [ "$RPM_BUILD_ROOT" != "%{_tmppath}/%{pkgdir}-root" ]
+then
+  echo
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo @                                                                    @
+  echo @  RPM_BUILD_ROOT is not what I expected.  Please clean it yourself. @
+  echo @                                                                    @
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo
+else
+  echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT"
+  rm -rf "$RPM_BUILD_ROOT"
+fi
+
+##############################################################################
+#
+# files
+#
+##############################################################################
+
+# empty 'files' means all distributed files
+%files
+%defattr(-, root, root)
+%{prefix}
+
+# Your application file list goes here
+# %{prefix}/lib/lib*.so*
+
+# Documentation
+# doc COPYING ChangeLog README AUTHORS NEWS
+# doc doc/*
+
+# link the module to the correct path
+%post 
+
+# before uninstall
+%preun
+
+# after uninstall
+%postun
+
+##############################################################################
+#
+# package devel
+#
+##############################################################################
+
+#package devel
+#Summary: Development files for %{pkgname}
+#Group: Applications/System
+#description devel
+#Development files for %{pkgname}.
+
+#files devel
+
+# Your development files go here
+# Programmers documentation goes here
+#doc doc
+
+# end of file
diff --git a/MAC/GCF/_PAL/Makefile.am b/MAC/GCF/_PAL/Makefile.am
index f3d5e75a296f5b75c3975945fba9c2ffc6b3f72e..1cc14c6d2217b30124a60a63c06c5be7faa710f1 100644
--- a/MAC/GCF/_PAL/Makefile.am
+++ b/MAC/GCF/_PAL/Makefile.am
@@ -1,3 +1,11 @@
-SUBDIRS=SAL PA PML PI
+SUBDIRS=SAL PA PML PI include
+
+DISTCHECK_CONFIGURE_FLAGS=\
+      --with-common=$(prefix)
+
+EXTRA_DIST = \
+      Makefile.common \
+      GCFPAL.spec \
+      autoconf_share/compiletool
 
 include $(top_srcdir)/Makefile.common
diff --git a/MAC/GCF/_PAL/PA/Makefile.am b/MAC/GCF/_PAL/PA/Makefile.am
index a014c15b3e0cc91454edade91ee05c7b57830868..00a990e3a66352158aaebbdcdedb3f9301d792a9 100644
--- a/MAC/GCF/_PAL/PA/Makefile.am
+++ b/MAC/GCF/_PAL/PA/Makefile.am
@@ -1,3 +1,3 @@
-SUBDIRS=src
+SUBDIRS=src pvss
 
 include $(top_srcdir)/Makefile.common
diff --git a/MAC/GCF/_PAL/PA/pvss/Makefile.am b/MAC/GCF/_PAL/PA/pvss/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..5b17a1d8c47a4c6ea35186e2b61ad4ab04eb7694
--- /dev/null
+++ b/MAC/GCF/_PAL/PA/pvss/Makefile.am
@@ -0,0 +1,3 @@
+SUBDIRS=panels scripts/libs
+
+include $(top_srcdir)/Makefile.common
diff --git a/MAC/GCF/_PAL/PA/pvss/panels/Makefile.am b/MAC/GCF/_PAL/PA/pvss/panels/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..5735f60849eb1b313c9d72c368b9d2985cbf8c93
--- /dev/null
+++ b/MAC/GCF/_PAL/PA/pvss/panels/Makefile.am
@@ -0,0 +1,8 @@
+pkgdatadir = $(datadir)/pvss/panels
+pkgdata_DATA = GCFPATest.pnl \
+	GCFPropSetLoader.pnl
+
+EXTRA_DIST = $(pkgdata_DATA)
+
+include $(top_srcdir)/Makefile.common
+
diff --git a/MAC/GCF/_PAL/PA/pvss/scripts/libs/Makefile.am b/MAC/GCF/_PAL/PA/pvss/scripts/libs/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..16dd6430c3ac0b82881a825e293eb71559b3260f
--- /dev/null
+++ b/MAC/GCF/_PAL/PA/pvss/scripts/libs/Makefile.am
@@ -0,0 +1,10 @@
+pkgdatadir = $(datadir)/pvss/scripts/libs
+pkgdata_DATA = gcfpa-com.ctl \
+	gcfpa-cwd.ctl \
+	gcfpa-prep.ctl \
+	gcfpa-pml.ctl
+
+EXTRA_DIST = $(pkgdata_DATA)
+
+include $(top_srcdir)/Makefile.common
+
diff --git a/MAC/GCF/_PAL/PA/src/Makefile.am b/MAC/GCF/_PAL/PA/src/Makefile.am
index 640abdfdfe07402246fb26ab2feb13a6774e2af6..eb2e50755ad9e2f78a838bf6f1c932a2d9d2eff2 100644
--- a/MAC/GCF/_PAL/PA/src/Makefile.am
+++ b/MAC/GCF/_PAL/PA/src/Makefile.am
@@ -13,8 +13,7 @@ libpa_la_SOURCES= $(DOCHDRS) \
 	GPA_RequestManager.cc \
 	GPA_Converter.cc
 	
-libpa_la_CPPFLAGS= -I$(top_srcdir)/include \
-	-I$(top_srcdir)/SAL/src
+#libpa_la_CPPFLAGS= -I$(top_srcdir)/SAL/src
 
 bin_PROGRAMS   		= PropertyAgent
   
@@ -25,10 +24,9 @@ PropertyAgent_LDADD		     			= libpa.la $(LOFAR_DEPEND) \
 PropertyAgent_DEPENDENCIES	= libpa.la $(LOFAR_DEPEND) \
 	$(top_builddir)/SAL/src/libsal.la
 	
-PropertyAgent_CPPFLAGS= -I$(top_srcdir)/include \
-	-I$(top_srcdir)/SAL/src
+#PropertyAgent_CPPFLAGS= -I$(top_srcdir)/SAL/src
 
-AM_CPPFLAGS = -DLOFARLOGGER_SUBPACKAGE=\"PA\"
+AM_CPPFLAGS = -DLOFARLOGGER_SUBPACKAGE=\"PA\" -I$(top_srcdir)/SAL/src
 
 #in case of make install these files will be copied to the bindir beside the test apps
 configfilesdir=$(bindir)
@@ -38,17 +36,11 @@ configfiles_DATA= \
 
 BUILT_SOURCES = 
 
-EXTRA_DIST = $(BUILT_SOURCES)
+EXTRA_DIST = $(BUILT_SOURCES) $(configfiles_DATA) gcf-pa.conf.in 
 
 sysconf_DATA= \
 	PropertyAgent.conf
 
-install-data-local:
-	mkdir -p $(bindir)/pvss/scripts
-	mkdir -p $(bindir)/pvss/panels
-	cp -Rf $(top_srcdir)/PA/pvss/scripts $(bindir)/pvss/
-	cp -Rf $(top_srcdir)/PA/pvss/panels $(bindir)/pvss/
-	
 %.conf: gcf-pa.conf.in
 	cp $< $@
 
diff --git a/MAC/GCF/_PAL/PA/src/preparePVSS-DB b/MAC/GCF/_PAL/PA/src/preparePVSS-DB
index 9f77499b06793ef988ca7da6b53f417c2ec61d35..b618da12f388cb21d7c826b2f05b9bfc256d1c7f 100644
--- a/MAC/GCF/_PAL/PA/src/preparePVSS-DB
+++ b/MAC/GCF/_PAL/PA/src/preparePVSS-DB
@@ -2,7 +2,7 @@
 
 PROJ_PATH=`grep '^proj_path' ${PVSS_II} | sed 's/^.*proj_path *= * "//' | sed 's/".*//'| sed -n '$p' | tail -n 1`
 echo PropertyAgent: Current running PVSS project has been found in $PROJ_PATH
-cp -Rf pvss/* $PROJ_PATH >> /dev/null
+cp -Rf ../share/pvss/* $PROJ_PATH >> /dev/null
 echo PropertyAgent: Prepare DB
 PVSS00ctrl -script libs/gcfpa-prep.ctl -currentproj
 echo PropertyAgent: Start watch-dog in the background
diff --git a/MAC/GCF/_PAL/PI/src/Makefile.am b/MAC/GCF/_PAL/PI/src/Makefile.am
index a9bf302437829ed7928acf77be225e9f3961b697..f4b9a60c760e3a96023ca56ffb1316ab0602111d 100644
--- a/MAC/GCF/_PAL/PI/src/Makefile.am
+++ b/MAC/GCF/_PAL/PI/src/Makefile.am
@@ -19,8 +19,6 @@ libpi_la_SOURCES= $(DOCHDRS) \
   GPI_PropertySet.cc \
   GPI_TH_Port.cc
 
-libpi_la_CPPFLAGS= -I$(top_srcdir)/include
-	
 bin_PROGRAMS   		= PropertyInterface
   
 PropertyInterface_SOURCES		= GPI_Main.cc
@@ -38,7 +36,7 @@ AM_CPPFLAGS = -DLOFARLOGGER_SUBPACKAGE=\"PI\"
 
 BUILT_SOURCES = 
 
-EXTRA_DIST = $(BUILT_SOURCES)
+EXTRA_DIST = $(BUILT_SOURCES) gcf-pi.conf.in
 
 sysconf_DATA= \
 	PropertyInterface.conf
diff --git a/MAC/GCF/_PAL/PML/src/Makefile.am b/MAC/GCF/_PAL/PML/src/Makefile.am
index 1ac95d615e063a36411371f1d4ffe46c6c196050..3bc5a63a163db4389169a64a02938c946a6e8e08 100644
--- a/MAC/GCF/_PAL/PML/src/Makefile.am
+++ b/MAC/GCF/_PAL/PML/src/Makefile.am
@@ -1,15 +1,4 @@
-pkgincludedir = $(includedir)/GCF/PAL
-pkginclude_HEADERS = \
-	../../include/GCF/PAL/GCF_ExtProperty.h \
-	../../include/GCF/PAL/GCF_Property.h \
-	../../include/GCF/PAL/GCF_MyProperty.h \
-	../../include/GCF/PAL/GCF_ExtPropertySet.h \
-	../../include/GCF/PAL/GCF_PropertySet.h \
-	../../include/GCF/PAL/GCF_MyPropertySet.h \
-	../../include/GCF/PAL/GCF_Answer.h \
-	../../include/GCF/PAL/GCF_PropertyProxy.h
-	
-DOCHDRS	=	$(pkginclude_HEADERS) \
+DOCHDRS	=	\
 	GPM_Controller.h \
 	GPM_PropertyService.h \
 	GPM_PropertyProxy.h \
@@ -38,14 +27,13 @@ libpml_la_SOURCES= $(DOCHDRS) \
 	GPM_PropertyService.cc \
 	GCF_PropertyProxy.cc
 
-libpml_la_CPPFLAGS= -I$(top_srcdir)/include \
-	-I$(top_srcdir)/SAL/src
+libpml_la_CPPFLAGS= -I$(top_srcdir)/SAL/src
 
 AM_CPPFLAGS = -DLOFARLOGGER_SUBPACKAGE=\"PML\"
 	
 BUILT_SOURCES = 
 
-EXTRA_DIST = $(BUILT_SOURCES)
+EXTRA_DIST = $(BUILT_SOURCES) gcf-pml.conf.in
 
 sysconf_DATA= \
 	gcf-pml.conf
diff --git a/MAC/GCF/_PAL/SAL/src/Makefile.am b/MAC/GCF/_PAL/SAL/src/Makefile.am
index f685ab9b6cea7e11545cdce68f3e7f669ddda003..61598575c21d824e46d6b6131aad46976ba14bb9 100644
--- a/MAC/GCF/_PAL/SAL/src/Makefile.am
+++ b/MAC/GCF/_PAL/SAL/src/Makefile.am
@@ -1,9 +1,4 @@
-pkginclude_HEADERS = \
-	../../include/GCF/PAL/GCF_PVSSPort.h \
-	../../include/GCF/PAL/GCF_PVSSInfo.h \
-	../../include/GCF/PAL/GCF_SysConnGuard.h
-
-DOCHDRS	=	$(pkginclude_HEADERS) \
+DOCHDRS	=	\
 	GSA_SCADAHandler.h \
 	GSA_PvssApi.h \
 	GSA_Resources.h \
@@ -27,8 +22,6 @@ libsal_la_SOURCES= $(DOCHDRS) \
 	GCF_SysConnGuard.cc \
 	GSA_SysConnGuard.cc
 
-libsal_la_CPPFLAGS= -I$(top_srcdir)/include
-
 AM_CPPFLAGS = -DLOFARLOGGER_SUBPACKAGE=\"SAL\"
 		
 include $(top_srcdir)/Makefile.common
diff --git a/MAC/GCF/_PAL/SAL/test/Makefile.am b/MAC/GCF/_PAL/SAL/test/Makefile.am
index 3a228dda8536a2c67227ce9a10629a4132a966e1..5200b5dca064a4749c80965ce3fccf8cae76bf5b 100644
--- a/MAC/GCF/_PAL/SAL/test/Makefile.am
+++ b/MAC/GCF/_PAL/SAL/test/Makefile.am
@@ -1,5 +1,4 @@
-cppflags = -I$(top_srcdir)/SAL/src \
-	-I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/SAL/src
 
 check_PROGRAMS 		= salEcho salPing
 
@@ -8,12 +7,10 @@ TESTS			= #salEcho salPing
 salEcho_SOURCES 			= Echo.cc Service.cc Echo_Protocol.cc
 salEcho_LDADD					= ../src/libsal.la $(LOFAR_DEPEND)
 salEcho_DEPENDENCIES	= ../src/libsal.la $(LOFAR_DEPEND)
-salEcho_CPPFLAGS			= $(cppflags)
 
 salPing_SOURCES 					= Ping.cc  Echo_Protocol.cc
 salPing_LDADD						=  ../src/libsal.la $(LOFAR_DEPEND)
 salPing_DEPENDENCIES			= ../src/libsal.la $(LOFAR_DEPEND)
-salPing_CPPFLAGS= $(cppflags)
 
 AUTOGEN = autogen
 SUFFIXES = .ph
@@ -23,7 +20,7 @@ SUFFIXES = .ph
 BUILT_SOURCES = \
 	Echo_Protocol.ph
 
-EXTRA_DIST = $(BUILT_SOURCES)
+EXTRA_DIST = $(BUILT_SOURCES) sal-test.conf.in
 
 sysconf_DATA= \
 	salEcho.conf \
diff --git a/MAC/GCF/_PAL/configure.in b/MAC/GCF/_PAL/configure.in
index 3db9ca7cc3f73fe4ebee618ee02c498fd00b7151..fe058a7bffe6f3d8f78dcbde182217fcca2ce3d1 100644
--- a/MAC/GCF/_PAL/configure.in
+++ b/MAC/GCF/_PAL/configure.in
@@ -2,10 +2,8 @@ dnl
 dnl Process this file with autoconf to produce a configure script.
 dnl
 AC_INIT(include/GCF/PAL/GCF_Property.h)
-dnl AC_CONFIG_AUX_DIR(config)
-dnl AM_CONFIG_HEADER(config/config.h)
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(GCF/PAL, 6.0)
+AM_INIT_AUTOMAKE(GCFPAL, 6.0, no-define)
 
 dnl Initialize for LOFAR (may set compilers)
 lofar_INIT
@@ -23,19 +21,6 @@ AC_PROG_LIBTOOL
 
 dnl Checks for libraries.
 
-dnl dnl Replace `main' with a function in -lfl:
-dnl AC_CHECK_LIB(fl, main)
-dnl dnl Replace `main' with a function in -lcosev_r:
-dnl AC_CHECK_LIB(cosev_r, main)
-dnl dnl Replace `main' with a function in -lcosnm_r:
-dnl AC_CHECK_LIB(cosnm_r, main)
-dnl dnl Replace `main' with a function in -lorb_r:
-dnl AC_CHECK_LIB(orb_r, main)
-dnl dnl Replace `main' with a function in -lpthread:
-dnl AC_CHECK_LIB(pthread, main)
-dnl dnl Replace `main' with a function in -lvport_r:
-dnl AC_CHECK_LIB(vport_r, main)
-
 dnl Checks for header files.
 AC_HEADER_STDC
 AC_CHECK_HEADERS(unistd.h)
@@ -51,8 +36,6 @@ dnl
 dnl Check for LOFAR specific things
 dnl
 lofar_GENERAL
-#lofar_QT
-lofar_MPI(0)
 lofar_PVSS(1)
 lofar_INTERNAL(LCS/Common, common, LCS-Common-2_3, 1, Common/LofarTypes.h,,)
 lofar_INTERNAL(LCS/Transport, transport, LCS-Transport-2_1, 1, Transport/DataHolder.h,,)
@@ -67,6 +50,9 @@ dnl Output Makefiles
 dnl
 AC_OUTPUT(
 PA/src/Makefile
+PA/pvss/Makefile
+PA/pvss/panels/Makefile
+PA/pvss/scripts/libs/Makefile
 PA/Makefile
 PI/src/Makefile
 PI/Makefile
@@ -75,5 +61,8 @@ PML/Makefile
 SAL/src/Makefile
 SAL/test/Makefile
 SAL/Makefile
+include/Makefile
+include/GCF/PAL/Makefile
 Makefile
+GCFPAL.spec
 )
diff --git a/MAC/GCF/_PAL/include/GCF/PAL/Makefile.am b/MAC/GCF/_PAL/include/GCF/PAL/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..414ec30321f413b38dded03ce1fab6806b8d193e
--- /dev/null
+++ b/MAC/GCF/_PAL/include/GCF/PAL/Makefile.am
@@ -0,0 +1,27 @@
+INSTHDRS =
+
+pkgincludedir = $(includedir)/GCF/PAL
+pkginclude_HEADERS = \
+	GCF_ExtProperty.h \
+	GCF_Property.h \
+	GCF_MyProperty.h \
+	GCF_ExtPropertySet.h \
+	GCF_PropertySet.h \
+	GCF_MyPropertySet.h \
+	GCF_Answer.h \
+	GCF_PropertyProxy.h \
+	GCF_PVSSPort.h \
+	GCF_PVSSInfo.h \
+	GCF_SysConnGuard.h
+	
+NOINSTHDRS =
+
+TCCHDRS = 
+
+nobase_pkginclude_HEADERS = $(INSTHDRS) $(TCCHDRS)
+
+noinst_HEADERS = $(NOINSTHDRS)
+
+DOCHDRS	= $(INSTHDRS) $(NOINSTHDRS)
+
+include $(top_srcdir)/Makefile.common
diff --git a/MAC/GCF/_PAL/include/Makefile.am b/MAC/GCF/_PAL/include/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..1e71b663886cb4addb285e737d1cbffef304d61b
--- /dev/null
+++ b/MAC/GCF/_PAL/include/Makefile.am
@@ -0,0 +1,3 @@
+SUBDIRS	= GCF/PAL
+
+include $(top_srcdir)/Makefile.common
diff --git a/MAC/GCF/_PALlight/CEP-PMLlight/src/Makefile.am b/MAC/GCF/_PALlight/CEP-PMLlight/src/Makefile.am
index 87a7a2f7fec9428a9aac9003f2581cf61cf22300..058943826e67808d05a8f5a106736f0aa60e3249 100644
--- a/MAC/GCF/_PALlight/CEP-PMLlight/src/Makefile.am
+++ b/MAC/GCF/_PALlight/CEP-PMLlight/src/Makefile.am
@@ -1,9 +1,4 @@
-pkgincludedir = $(includedir)/GCF/PALlight
-pkginclude_HEADERS = \
-	../../include/GCF/PALlight/CEPProperty.h \
-	../../include/GCF/PALlight/CEPPropertySet.h
-	
-DOCHDRS	=	$(pkginclude_HEADERS) \
+DOCHDRS	=	\
   PIClient.h \
   PICEPDefines.h
         
@@ -14,8 +9,6 @@ libceppmllight_la_SOURCES= $(DOCHDRS) \
   CEPPropertySet.cc \
   PIClient.cc
   
-libceppmllight_la_CPPFLAGS= -I$(top_srcdir)/include
-
 lib_LTLIBRARIES 	= libgcfceppallight.la
 
 libgcfceppallight_la_SOURCES=
diff --git a/MAC/GCF/_PALlight/GCFPALlight.spec.in b/MAC/GCF/_PALlight/GCFPALlight.spec.in
new file mode 100644
index 0000000000000000000000000000000000000000..674b9b151d0832a5cc8f7f2efffa7968a846e95b
--- /dev/null
+++ b/MAC/GCF/_PALlight/GCFPALlight.spec.in
@@ -0,0 +1,160 @@
+# -*- Mode:rpm-spec -*-
+# GCFPALlight.spec.in
+#
+
+##############################################################################
+#
+# Preamble
+#
+##############################################################################
+
+Summary: GCFPALlight is the common GCF software package providing a set of GCF wide type definitions.
+
+%define release @RPM_RELEASE@
+%define version @VERSION@
+%define pkgname @PACKAGE@
+%define pkgdir %{pkgname}-%{version}-%{release}
+%define prefix /opt/lofar
+%define configure_args @RPM_CONFIGURE_ARGS@
+##define build_kernel_version @BUILD_KERNEL_VERSION@
+
+Name: %{pkgname}
+Version: %{version}
+Release: %{release}
+Copyright: LGPL
+Group: Application/System
+Source: %{pkgname}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{pkgdir}-root
+URL: http://www.astron.nl
+Prefix: %{prefix}
+BuildArchitectures: i386 # Target platforms, i.e., i586
+Requires: Common, GCFCommon, GCFTM, GCFProtocols, Transport
+Packager: %{packager}
+Distribution: The LOFAR project
+Vendor: ASTRON
+
+AutoReqProv: no
+
+%description
+
+GCFPALlight is the package handling the data transport in LOFAR.
+
+##############################################################################
+#
+# prep
+#
+##############################################################################
+%prep
+echo $prefix
+
+# create the build directory, untar the source
+%setup
+
+##############################################################################
+#
+# build
+#
+##############################################################################
+%build
+./configure %{configure_args} --prefix=%{prefix} && make
+
+##############################################################################
+#
+# install
+#
+##############################################################################
+%install
+# To make things work with BUILDROOT
+if [ "$RPM_BUILD_ROOT" != "%{_tmppath}/%{pkgdir}-root" ]
+then
+  echo
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo @                                                                    @
+  echo @  RPM_BUILD_ROOT is not what I expected.  Please clean it yourself. @
+  echo @                                                                    @
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo
+else
+  echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT"
+  rm -rf "$RPM_BUILD_ROOT"
+fi
+mkdir -p $RPM_BUILD_ROOT%{prefix}
+make DESTDIR="$RPM_BUILD_ROOT" install
+
+#uninstall
+
+##############################################################################
+#
+# verify
+#
+##############################################################################
+#verify
+
+##############################################################################
+#
+# clean
+#
+##############################################################################
+%clean
+# Call me paranoid, but I do not want to be responsible for nuking
+# someone's harddrive!
+if [ "$RPM_BUILD_ROOT" != "%{_tmppath}/%{pkgdir}-root" ]
+then
+  echo
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo @                                                                    @
+  echo @  RPM_BUILD_ROOT is not what I expected.  Please clean it yourself. @
+  echo @                                                                    @
+  echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+  echo
+else
+  echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT"
+  rm -rf "$RPM_BUILD_ROOT"
+fi
+
+##############################################################################
+#
+# files
+#
+##############################################################################
+
+# empty 'files' means all distributed files
+%files
+%defattr(-, root, root)
+%{prefix}
+
+# Your application file list goes here
+# %{prefix}/lib/lib*.so*
+
+# Documentation
+# doc COPYING ChangeLog README AUTHORS NEWS
+# doc doc/*
+
+# link the module to the correct path
+%post 
+
+# before uninstall
+%preun
+
+# after uninstall
+%postun
+
+##############################################################################
+#
+# package devel
+#
+##############################################################################
+
+#package devel
+#Summary: Development files for %{pkgname}
+#Group: Applications/System
+#description devel
+#Development files for %{pkgname}.
+
+#files devel
+
+# Your development files go here
+# Programmers documentation goes here
+#doc doc
+
+# end of file
diff --git a/MAC/GCF/_PALlight/Makefile.am b/MAC/GCF/_PALlight/Makefile.am
index a970e099734c7ff54e97ab06a96ec86d9455ee05..2c7ac1f2a575c92a12f1025431a35fc0e7c8d158 100644
--- a/MAC/GCF/_PALlight/Makefile.am
+++ b/MAC/GCF/_PALlight/Makefile.am
@@ -1,3 +1,11 @@
-SUBDIRS=PMLlight CEP-PMLlight
+SUBDIRS=PMLlight CEP-PMLlight include
+
+DISTCHECK_CONFIGURE_FLAGS=\
+      --with-common=$(prefix)
+
+EXTRA_DIST = \
+      Makefile.common \
+      GCFPALlight.spec \
+      autoconf_share/compiletool
 
 include $(top_srcdir)/Makefile.common
diff --git a/MAC/GCF/_PALlight/PMLlight/src/Makefile.am b/MAC/GCF/_PALlight/PMLlight/src/Makefile.am
index f4c916c5164ad119d9bbf763122e8aa3d6abb7e3..78c4804d5f3f1e091636ac26b0af4e98a080764a 100644
--- a/MAC/GCF/_PALlight/PMLlight/src/Makefile.am
+++ b/MAC/GCF/_PALlight/PMLlight/src/Makefile.am
@@ -1,10 +1,4 @@
-pkgincludedir = $(includedir)/GCF/PALlight
-pkginclude_HEADERS = \
-	../../include/GCF/PALlight/GCF_RTMyProperty.h \
-	../../include/GCF/PALlight/GCF_RTMyPropertySet.h \
-	../../include/GCF/PALlight/GCF_RTAnswer.h
-	
-DOCHDRS	=	$(pkginclude_HEADERS) \
+DOCHDRS	=	\
   GPM_RTController.h \
   GPM_RTDefines.h
         
@@ -16,8 +10,6 @@ libpmllight_la_SOURCES= $(DOCHDRS) \
   GCF_RTMyPropertySet.cc \
   GPM_RTController.cc
   
-libpmllight_la_CPPFLAGS= -I$(top_srcdir)/include
-
 lib_LTLIBRARIES 	= libgcfpallight.la
 
 libgcfpallight_la_SOURCES=
@@ -27,6 +19,8 @@ libgcfpallight_la_DEPENDENCIES= libpmllight.la $(LOFAR_DEPEND)
 
 AM_CPPFLAGS = -DLOFARLOGGER_SUBPACKAGE=\"RTC\"
 
+EXTRA_DIST= $(configfiles_DATA) gcf-pmllight.conf.in
+
 sysconf_DATA= \
 	gcf-pmllight.conf
 	
@@ -37,5 +31,4 @@ configfiles_DATA= \
 %.conf: %.conf.in
 	cp $< $@
 
-include $(top_srcdir)/Makefile.common
-
+include $(top_srcdir)/Makefile.common
\ No newline at end of file
diff --git a/MAC/GCF/_PALlight/configure.in b/MAC/GCF/_PALlight/configure.in
index 3d4f51d0a0d27ec57b8b12e411d0aac3a3f0255e..47c0f07efeb9a086e2734b12797309b39efbae25 100644
--- a/MAC/GCF/_PALlight/configure.in
+++ b/MAC/GCF/_PALlight/configure.in
@@ -2,10 +2,8 @@ dnl
 dnl Process this file with autoconf to produce a configure script.
 dnl
 AC_INIT(include/GCF/PALlight/GCF_RTMyProperty.h)
-dnl AC_CONFIG_AUX_DIR(config)
-dnl AM_CONFIG_HEADER(config/config.h)
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(GCF/PALlight, 6.0)
+AM_INIT_AUTOMAKE(GCFPALlight, 6.0, no-define)
 
 dnl Initialize for LOFAR (may set compilers)
 lofar_INIT
@@ -23,18 +21,6 @@ AC_PROG_LIBTOOL
 
 dnl Checks for libraries.
 
-dnl dnl Replace `main' with a function in -lfl:
-dnl AC_CHECK_LIB(fl, main)
-dnl dnl Replace `main' with a function in -lcosev_r:
-dnl AC_CHECK_LIB(cosev_r, main)
-dnl dnl Replace `main' with a function in -lcosnm_r:
-dnl AC_CHECK_LIB(cosnm_r, main)
-dnl dnl Replace `main' with a function in -lorb_r:
-dnl AC_CHECK_LIB(orb_r, main)
-dnl dnl Replace `main' with a function in -lpthread:
-dnl AC_CHECK_LIB(pthread, main)
-dnl dnl Replace `main' with a function in -lvport_r:
-dnl AC_CHECK_LIB(vport_r, main)
 
 dnl Checks for header files.
 AC_HEADER_STDC
@@ -51,8 +37,6 @@ dnl
 dnl Check for LOFAR specific things
 dnl
 lofar_GENERAL
-#lofar_QT
-lofar_MPI(0)
 lofar_INTERNAL(LCS/Common, common, LCS-Common-2_3, 1, Common/LofarTypes.h,,)
 lofar_INTERNAL(LCS/Transport, transport, LCS-Transport-2_1, 1, Transport/DataHolder.h,,)
 lofar_INTERNAL(MAC/GCF/GCFCommon, gcfcommon, MAC-GCF-6_0, 1, GCF/GCF_Defines.h,,)
@@ -68,5 +52,8 @@ PMLlight/src/Makefile
 PMLlight/Makefile
 CEP-PMLlight/src/Makefile
 CEP-PMLlight/Makefile
+include/Makefile
+include/GCF/PALlight/Makefile
 Makefile
+GCFPALlight.spec
 )
diff --git a/MAC/GCF/_PALlight/include/GCF/PALlight/Makefile.am b/MAC/GCF/_PALlight/include/GCF/PALlight/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..f99ed69bc2bb9bc90a3ea9461b7ea62898059fc5
--- /dev/null
+++ b/MAC/GCF/_PALlight/include/GCF/PALlight/Makefile.am
@@ -0,0 +1,21 @@
+INSTHDRS =
+
+pkgincludedir = $(includedir)/GCF/PALlight
+pkginclude_HEADERS = \
+	GCF_RTMyProperty.h \
+	GCF_RTMyPropertySet.h \
+	GCF_RTAnswer.h \
+	CEPProperty.h \
+	CEPPropertySet.h
+	
+NOINSTHDRS =
+
+TCCHDRS = 
+
+nobase_pkginclude_HEADERS = $(INSTHDRS) $(TCCHDRS)
+
+noinst_HEADERS = $(NOINSTHDRS)
+
+DOCHDRS	= $(INSTHDRS) $(NOINSTHDRS)
+
+include $(top_srcdir)/Makefile.common
diff --git a/MAC/GCF/_PALlight/include/Makefile.am b/MAC/GCF/_PALlight/include/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..2174ab4886566d26453f1105d555423c8a7f1df9
--- /dev/null
+++ b/MAC/GCF/_PALlight/include/Makefile.am
@@ -0,0 +1,3 @@
+SUBDIRS	= GCF/PALlight
+
+include $(top_srcdir)/Makefile.common