Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 310)
+++ CMakeLists.txt	(revision 313)
@@ -24,9 +24,8 @@
 SET(DEFAULT_CONF_PATH ${CMAKE_INSTALL_PREFIX}/etc/freeDiameter CACHE PATH "Default location of freeDiameter configuration files")
 
-SET(INSTALL_DOCUMENTATION_PATH 	${CMAKE_INSTALL_PREFIX}/doc/freeDiameter	CACHE PATH "Directory where the documentation is installed.")
-SET(INSTALL_HEADERS_PATH 	${CMAKE_INSTALL_PREFIX}/include/freeDiameter 	CACHE PATH "Directory where the headers are installed.")
-SET(INSTALL_EXTENSIONS_PATH 	${CMAKE_INSTALL_PREFIX}/lib/freeDiameter	CACHE PATH "Directory where the extensions are installed / searched.")
-SET(INSTALL_DAEMON_PATH 	${CMAKE_INSTALL_PREFIX}/bin 			CACHE PATH "Directory where the daemon binary is installed.")
-SET(INSTALL_LIBRARY_PATH 	${CMAKE_INSTALL_PREFIX}/lib 			CACHE PATH "Directory where the libfreeDiameter library is installed.")
+SET(INSTALL_HEADERS_SUFFIX 		include/freeDiameter 	CACHE PATH "Directory where the headers are installed (relative to CMAKE_INSTALL_PREFIX).")
+SET(INSTALL_EXTENSIONS_SUFFIX 		lib/freeDiameter	CACHE PATH "Directory where the extensions are installed / searched (relative to CMAKE_INSTALL_PREFIX).")
+SET(INSTALL_DAEMON_SUFFIX 		bin 			CACHE PATH "Directory where the daemon binary is installed (relative to CMAKE_INSTALL_PREFIX).")
+SET(INSTALL_LIBRARY_SUFFIX 		lib 			CACHE PATH "Directory where the libfreeDiameter library is installed (relative to CMAKE_INSTALL_PREFIX).")
 
 # All source code should be POSIX 200112L compatible, but some other extensions might be used, so:
@@ -59,86 +58,2 @@
 # Extensions (there is no point in freeDiameter without any extension)
 SUBDIRS(extensions)
-
-
-####
-## INSTALL section ##
-
-INSTALL(FILES README LICENSE doc/freediameter.conf.sample
-	DESTINATION ${INSTALL_DOCUMENTATION_PATH}
-	COMPONENT freeDiameter-daemon)
-
-
-
-####
-## Packaging section ##
-
-# Default: build a debian package
-SET(CPACK_GENERATOR DEB)
-
-# Parameters for the package
-SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
-SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "freeDiameter: a Diameter implementation (protocol for Authentication, Authorization and Accounting, evolution of RADIUS)")
-SET(CPACK_PACKAGE_VENDOR "This is open software")
-SET(CPACK_PACKAGE_VERSION_MAJOR "${FD_PROJECT_VERSION_MAJOR}")
-SET(CPACK_PACKAGE_VERSION_MINOR "${FD_PROJECT_VERSION_MINOR}")
-SET(CPACK_PACKAGE_VERSION_PATCH "${FD_PROJECT_VERSION_REV}")
-
-SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
-SET(CPACK_PACKAGE_CONTACT "Sebastien Decugis <sdecugis@nict.go.jp>")
-SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
-
-SET(CPACK_COMPONENTS_ALL 
-	freeDiameter-common 
-	freeDiameter-daemon 
-	freeDiameter-dictionary-RFC4005
-	freeDiameter-dictionary-RFC4072
-	freeDiameter-radius-gateway
-	freeDiameter-accounting-server
-	freeDiameter-dev
-	freeDiameter-debug-tools
-	)
-	
-# freeDiameter-common
-SET( CPACK_COMPONENT_FREEDIAMETER-COMMON_DISPLAY_NAME "freeDiameter library" )
-SET( CPACK_COMPONENT_FREEDIAMETER-COMMON_DESCRIPTION "The library needed by all freeDiameter components" )
-SET( CPACK_COMPONENT_FREEDIAMETER-COMMON_REQUIRED ON)
-
-# freeDiameter-daemon
-SET( CPACK_COMPONENT_FREEDIAMETER-DAEMON_DISPLAY_NAME "freeDiameter daemon binary" )
-SET( CPACK_COMPONENT_FREEDIAMETER-DAEMON_DESCRIPTION "The daemon providing Diameter Base Protocol support" )
-SET( CPACK_COMPONENT_FREEDIAMETER-DAEMON_DEPENDS freeDiameter-common)
-
-# freeDiameter-dictionary-RFC4005
-SET( CPACK_COMPONENT_FREEDIAMETER-DICTIONARY-RFC4005_DISPLAY_NAME "freeDiameter RFC4005 (NASREQ) dictionary" )
-SET( CPACK_COMPONENT_FREEDIAMETER-DAEMON_DESCRIPTION "An extension to the daemon's dictionary, providing commands and AVPs for NASREQ application" )
-SET( CPACK_COMPONENT_FREEDIAMETER-DAEMON_DEPENDS freeDiameter-daemon)
-
-# freeDiameter-dictionary-RFC4072
-SET( CPACK_COMPONENT_FREEDIAMETER-DICTIONARY-RFC4072_DISPLAY_NAME "freeDiameter RFC4072 (EAP) dictionary" )
-SET( CPACK_COMPONENT_FREEDIAMETER-DAEMON_DESCRIPTION "An extension to the daemon's dictionary, providing commands and AVPs for Diameter EAP application" )
-SET( CPACK_COMPONENT_FREEDIAMETER-DAEMON_DEPENDS freeDiameter-dictionary-RFC4005)
-
-# freeDiameter-radius-gateway
-SET( CPACK_COMPONENT_FREEDIAMETER-RADIUS-GATEWAY_DISPLAY_NAME "RADIUS/Diameter gateway extension for freeDiameter" )
-SET( CPACK_COMPONENT_FREEDIAMETER-RADIUS-GATEWAY_DESCRIPTION "This extension provides translation of RADIUS client messages to Diameter servers" )
-SET( CPACK_COMPONENT_FREEDIAMETER-RADIUS-GATEWAY_DEPENDS freeDiameter-dictionary-RFC4072)
-
-# freeDiameter-accounting-server
-SET( CPACK_COMPONENT_FREEDIAMETER-ACCOUNTING-SERVER_DISPLAY_NAME "Accounting server extension for freeDiameter" )
-SET( CPACK_COMPONENT_FREEDIAMETER-ACCOUNTING-SERVER_DESCRIPTION "This extension provides a simple configurable Diameter Base Accounting implementation" )
-SET( CPACK_COMPONENT_FREEDIAMETER-ACCOUNTING-SERVER_DEPENDS freeDiameter-daemon)
-
-# freeDiameter-dev
-SET( CPACK_COMPONENT_FREEDIAMETER-DEV_DISPLAY_NAME "freeDiameter headers" )
-SET( CPACK_COMPONENT_FREEDIAMETER-DEV_DESCRIPTION "Install the headers if you plan to develop new freeDiameter extensions" )
-SET( CPACK_COMPONENT_FREEDIAMETER-DEV_DEPENDS freeDiameter-common)
-
-# freeDiameter-debug-tools
-SET( CPACK_COMPONENT_FREEDIAMETER-DEBUG-TOOLS_DISPLAY_NAME "freeDiameter debug tools" )
-SET( CPACK_COMPONENT_FREEDIAMETER-DEBUG-TOOLS_DESCRIPTION "A set of tools meant for debugging freeDiameter" )
-SET( CPACK_COMPONENT_FREEDIAMETER-DEBUG-TOOLS_DEPENDS freeDiameter-daemon)
-
-# This is not working well at this time (may 2010), so leave it commented out for the moment.
-# INCLUDE(CPack)
-
-
Index: INSTALL.Ubuntu
===================================================================
--- INSTALL.Ubuntu	(revision 311)
+++ INSTALL.Ubuntu	(revision 313)
@@ -62,5 +62,5 @@
       -DDEFAULT_CONF_PATH:PATH=/etc/freeDiameter \
       -DCMAKE_INSTALL_PREFIX:PATH=/usr \
-      -DINSTALL_DOCUMENTATION_PATH:PATH=/usr/share/doc/freeDiameter \
+      -DINSTALL_DOCUMENTATION_SUFFIX:PATH=share/doc/freeDiameter \
       -DBUILD_APP_ACCT:BOOL=ON \
       -DBUILD_APP_RADGW:BOOL=ON \
Index: debian/control
===================================================================
--- debian/control	(revision 312)
+++ debian/control	(revision 313)
@@ -3,8 +3,8 @@
 Priority: optional
 Maintainer: Sebastien Decugis <sdecugis@nict.go.jp>
-Build-Depends: debhelper (>=7.0.50~),
+Build-Depends: debhelper ( >= 7),
  cmake, make, gcc, bison, flex,
  libsctp-dev, libgnutls-dev, libgcrypt-dev, libpq-dev
-Standards-Version: 3.8.4
+Standards-Version: 3.8.3
 Homepage: http://aaa.koganei.wide.ad.jp
 
@@ -19,18 +19,4 @@
  See 'freeDiameter-dev' package to retrieve the API for the library.
 
-Package: freediameter-daemon
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, freediameter-common (= ${binary:Version})
-Suggests: ssl-cert, freediameter-dictionary-RFC4005, freediameter-dictionary-RFC4072
-Description: The freeDiameter daemon. 
- The freeDiameter daemon provides support for the Diameter
- Base Protocol. Without any extension, the daemon can only
- be used as a Diameter routing agent. You probably want to 
- install some freeDiameter extension to extend its features.
- .
- The daemon is shipped with a small set of extensions, for
- example to configure the routing behavior. See the 
- documentation for more details.
-
 Package: freediameter-dev
 Architecture: any
@@ -38,14 +24,29 @@
 Description: This package provides the development files for freeDiameter.
 
+Package: freediameter-daemon
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, freediameter-common (= ${binary:Version})
+Suggests: ssl-cert, freediameter-dictionary-rfc4005, freediameter-dictionary-rfc4072
+Description: The freeDiameter daemon. 
+ The freeDiameter daemon provides support for the Diameter
+ Base Protocol. Without any extension, the daemon can only
+ be used as a Diameter routing agent. You probably want to 
+ install some freeDiameter extension(s) to extend its 
+ features.
+ .
+ The daemon is shipped with a small set of extensions, for
+ example to configure the routing behavior. See the 
+ examples for more details.
+
 Package: freediameter-debug-tools
 Architecture: any
-Depends: freediameter-daemon (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Depends: ${misc:Depends}, freediameter-daemon (= ${binary:Version})
 Description: freeDiameter debug tools.
  This package provides useful tools to help tracking 
  problems in freeDiameter installation.
 
-Package: freediameter-dictionary-RFC4005
+Package: freediameter-dictionary-rfc4005
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, freediameter-daemon (= ${binary:Version})
+Depends: ${misc:Depends}, freediameter-daemon (= ${binary:Version})
 Description: RFC4005 (NASREQ) dictionary support.
  This freeDiameter extension provides the dictionary support
@@ -58,7 +59,7 @@
  This extension does not require a configuration file.
 
-Package: freediameter-dictionary-RFC4072
+Package: freediameter-dictionary-rfc4072
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, freediameter-dictionary-RFC4005 (= ${binary:Version})
+Depends: ${misc:Depends}, freediameter-dictionary-rfc4005 (= ${binary:Version})
 Description: RFC4072 (Diameter EAP) dictionary support.
  This freeDiameter extension provides the dictionary support
@@ -71,7 +72,34 @@
  This extension does not require a configuration file.
 
+Package: freediameter-radius-gateway
+Architecture: any
+Depends: ${misc:Depends}, freediameter-dictionary-rfc4072 (= ${binary:Version})
+Description: RADIUS/Diameter extensible gateway.
+ This freeDiameter extension implements a RADIUS to Diameter
+ gateway. It allows a RADIUS client to connect to a Diameter
+ server.
+ .
+ The support for specific Diameter applications and/or RADIUS 
+ extensions is provided in the gateway by the use of plugins.
+ Currently, the following plugins are available:
+  - echodrop.rgwx : drop or echo a RADIUS attribute. 
+                    The attribute is not converted to Diameter.
+		    See echodrop.rgwx.conf.sample for details.
+  - auth.rgwx : Convert Access-Request to Diameter AAR or DER.
+                Requests For Comments: RADIUS: 2865, 3162, 2868,
+		2869, 3579; Diameter: 4005, 4072.
+  - acct.rgwx : Converts Accounting-Request (2866) to Diameter 
+                ACR (3588).
+ .
+ In order to use this extension, your main freeDiameter 
+ configuration file must contain a LoadExtension directive. 
+ See freeDiameter documentation for more details. 
+ .
+ This extension requires a configuration file.
+ See app_radgw.conf.sample for more details.
+
 Package: freediameter-accounting-server
 Architecture: any
-Depends: freediameter-daemon (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Depends: ${misc:Depends}, freediameter-daemon (= ${binary:Version}), libpq5
 Description: freeDiameter simple Accounting server.
  This freeDiameter extension implements the Diameter Base 
Index: extensions/_sample/CMakeLists.txt
===================================================================
--- extensions/_sample/CMakeLists.txt	(revision 305)
+++ extensions/_sample/CMakeLists.txt	(revision 313)
@@ -18,5 +18,6 @@
 ## INSTALL section ##
 
-INSTALL(TARGETS dbg_sample
-	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_PATH}
-	COMPONENT freeDiameter-debug-tools)
+# Uncomment the following lines to have the extension installed
+# INSTALL(TARGETS dbg_sample
+# 	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX}
+# 	COMPONENT freeDiameter-debug-tools)
Index: extensions/acl_wl/CMakeLists.txt
===================================================================
--- extensions/acl_wl/CMakeLists.txt	(revision 305)
+++ extensions/acl_wl/CMakeLists.txt	(revision 313)
@@ -35,8 +35,4 @@
 # We install with the daemon component because it is a base feature.
 INSTALL(TARGETS acl_wl
-	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_PATH}
+	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX}
 	COMPONENT freeDiameter-daemon)
-
-INSTALL(FILES ../../doc/acl_wl.conf.sample
-	DESTINATION ${INSTALL_DOCUMENTATION_PATH}
-	COMPONENT freeDiameter-daemon)
Index: extensions/app_acct/CMakeLists.txt
===================================================================
--- extensions/app_acct/CMakeLists.txt	(revision 305)
+++ extensions/app_acct/CMakeLists.txt	(revision 313)
@@ -35,8 +35,4 @@
 
 INSTALL(TARGETS app_acct
-	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_PATH}
+	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX}
 	COMPONENT freeDiameter-accounting-server)
-
-INSTALL(FILES ../../doc/app_acct.conf.sample
-	DESTINATION ${INSTALL_DOCUMENTATION_PATH}
-	COMPONENT freeDiameter-accounting-server)
Index: extensions/app_radgw/CMakeLists.txt
===================================================================
--- extensions/app_radgw/CMakeLists.txt	(revision 305)
+++ extensions/app_radgw/CMakeLists.txt	(revision 313)
@@ -69,5 +69,5 @@
   TARGET_LINK_LIBRARIES(${PLGNAME} rgw_common)
   INSTALL(TARGETS ${PLGNAME}
-	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_PATH}
+	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX}
 	COMPONENT freeDiameter-radius-gateway)
 ENDMACRO(RGWX_ADD_PLUGIN)
@@ -115,11 +115,6 @@
 
 INSTALL(TARGETS app_radgw
-	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_PATH}
+	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX}
 	COMPONENT freeDiameter-radius-gateway)
 
-INSTALL(FILES ../../doc/app_radgw.conf.sample
-	DESTINATION ${INSTALL_DOCUMENTATION_PATH}
-	COMPONENT freeDiameter-radius-gateway)
-
-
 # Note that all compiled plugins are added by the RGWX_ADD_PLUGIN macro in the component freeDiameter-radius-gateway as well.
Index: extensions/dbg_monitor/CMakeLists.txt
===================================================================
--- extensions/dbg_monitor/CMakeLists.txt	(revision 305)
+++ extensions/dbg_monitor/CMakeLists.txt	(revision 313)
@@ -8,5 +8,5 @@
 
 INSTALL(TARGETS dbg_monitor
-	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_PATH}
+	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX}
 	COMPONENT freeDiameter-debug-tools)
 
Index: extensions/dbg_rt/CMakeLists.txt
===================================================================
--- extensions/dbg_rt/CMakeLists.txt	(revision 305)
+++ extensions/dbg_rt/CMakeLists.txt	(revision 313)
@@ -10,4 +10,4 @@
 
 INSTALL(TARGETS dbg_rt
-	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_PATH}
+	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX}
 	COMPONENT freeDiameter-debug-tools)
Index: extensions/dict_eap/CMakeLists.txt
===================================================================
--- extensions/dict_eap/CMakeLists.txt	(revision 305)
+++ extensions/dict_eap/CMakeLists.txt	(revision 313)
@@ -10,4 +10,4 @@
 
 INSTALL(TARGETS dict_eap
-	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_PATH}
+	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX}
 	COMPONENT freeDiameter-dictionary-RFC4072)
Index: extensions/dict_nasreq/CMakeLists.txt
===================================================================
--- extensions/dict_nasreq/CMakeLists.txt	(revision 305)
+++ extensions/dict_nasreq/CMakeLists.txt	(revision 313)
@@ -10,4 +10,4 @@
 
 INSTALL(TARGETS dict_nasreq
-	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_PATH}
+	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX}
 	COMPONENT freeDiameter-dictionary-RFC4005)
Index: extensions/rt_default/CMakeLists.txt
===================================================================
--- extensions/rt_default/CMakeLists.txt	(revision 305)
+++ extensions/rt_default/CMakeLists.txt	(revision 313)
@@ -49,9 +49,4 @@
 # We install with the daemon component because it is a base feature.
 INSTALL(TARGETS rt_default
-	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_PATH}
+	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX}
 	COMPONENT freeDiameter-daemon)
-
-INSTALL(FILES ../../doc/rt_default.conf.sample
-	DESTINATION ${INSTALL_DOCUMENTATION_PATH}
-	COMPONENT freeDiameter-daemon)
-
Index: extensions/test_acct/CMakeLists.txt
===================================================================
--- extensions/test_acct/CMakeLists.txt	(revision 305)
+++ extensions/test_acct/CMakeLists.txt	(revision 313)
@@ -9,5 +9,5 @@
 
 INSTALL(TARGETS test_acct
-	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_PATH}
+	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX}
 	COMPONENT freeDiameter-debug-tools)
 
Index: extensions/test_app/CMakeLists.txt
===================================================================
--- extensions/test_app/CMakeLists.txt	(revision 305)
+++ extensions/test_app/CMakeLists.txt	(revision 313)
@@ -27,8 +27,4 @@
 
 INSTALL(TARGETS test_app
-	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_PATH}
+	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX}
 	COMPONENT freeDiameter-debug-tools)
-
-INSTALL(FILES ../../doc/test_app.conf.sample
-	DESTINATION ${INSTALL_DOCUMENTATION_PATH}
-	COMPONENT freeDiameter-debug-tools)
Index: extensions/test_rt_any/CMakeLists.txt
===================================================================
--- extensions/test_rt_any/CMakeLists.txt	(revision 305)
+++ extensions/test_rt_any/CMakeLists.txt	(revision 313)
@@ -10,4 +10,4 @@
 
 INSTALL(TARGETS test_rt_any
-	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_PATH}
+	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX}
 	COMPONENT freeDiameter-debug-tools)
Index: freeDiameter/CMakeLists.txt
===================================================================
--- freeDiameter/CMakeLists.txt	(revision 305)
+++ freeDiameter/CMakeLists.txt	(revision 313)
@@ -83,4 +83,4 @@
 
 INSTALL(TARGETS freeDiameterd
-	RUNTIME DESTINATION ${INSTALL_DAEMON_PATH}
+	RUNTIME DESTINATION ${INSTALL_DAEMON_SUFFIX}
 	COMPONENT freeDiameter-daemon)
Index: include/freeDiameter/CMakeLists.txt
===================================================================
--- include/freeDiameter/CMakeLists.txt	(revision 305)
+++ include/freeDiameter/CMakeLists.txt	(revision 313)
@@ -91,6 +91,6 @@
 
 ##########################
-# rename this var for the file
-SET(DEFAULT_EXTENSIONS_PATH ${INSTALL_EXTENSIONS_PATH})
+# Create the absolute path for searching extensions
+SET(DEFAULT_EXTENSIONS_PATH ${CMAKE_INSTALL_PREFIX}/${INSTALL_EXTENSIONS_SUFFIX})
 
 ##########################
@@ -107,5 +107,5 @@
 # The headers from this directory are required to develop new extensions for freeDiameter.
 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/freeDiameter-host.h libfreeDiameter.h freeDiameter.h extension.h
-	DESTINATION ${INSTALL_HEADERS_PATH}
+	DESTINATION ${INSTALL_HEADERS_SUFFIX}
 	COMPONENT freeDiameter-dev)
 
Index: libfreeDiameter/CMakeLists.txt
===================================================================
--- libfreeDiameter/CMakeLists.txt	(revision 305)
+++ libfreeDiameter/CMakeLists.txt	(revision 313)
@@ -34,5 +34,5 @@
 
 INSTALL(TARGETS libfreeDiameter
-	LIBRARY DESTINATION ${INSTALL_LIBRARY_PATH}
+	LIBRARY DESTINATION ${INSTALL_LIBRARY_SUFFIX}
 	COMPONENT freeDiameter-common)
 
