1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2025-10-16 07:28:25 +02:00

merged libfwbuilder into fwbuilder as src/libfwbuilder; unit tests do not work yet

This commit is contained in:
Vadim Kurland 2010-12-25 20:12:30 -08:00
parent a6e6bfa2ac
commit 2417543eba
61 changed files with 1567 additions and 8446 deletions

1
.gitignore vendored
View File

@ -24,6 +24,7 @@ qmake.inc
ltmain.sh
configure
config.h
libtool
.obj
.moc
.ui

24
VERSION
View File

@ -13,6 +13,28 @@ RELEASE="b@BUILD_NUM@"
BETA="no"
REQUIRED_LIBFWBUILDER_VERSION="4.1.4"
#
# Library versioning:
#
# +1 : ? : +1 == new interface that does not break old one
# +1 : ? : 0 == new interface that breaks old one
# ? : ? : 0 == no new interfaces, but breaks apps
# ? :+1 : ? == just some internal changes, nothing breaks but might work
# better
# CURRENT : REVISION : AGE
#
# for more details see libtool manual, chapter "Libtool's versioning system"
LIBFWBUILDER_CURRENT=9
LIBFWBUILDER_REVISION=1
LIBFWBUILDER_AGE=0
LIBFWBUILDER_SO_VERSION=${LIBFWBUILDER_CURRENT}:${LIBFWBUILDER_REVISION}:${LIBFWBUILDER_AGE}
LIBFWBUILDER_SOLIB_VERSION=${LIBFWBUILDER_CURRENT}.${LIBFWBUILDER_REVISION}.${LIBFWBUILDER_AGE}
LIBFWBUILDER_SOLIB_SYMLINK1_VERSION=${LIBFWBUILDER_CURRENT}.${LIBFWBUILDER_REVISION}
LIBFWBUILDER_SOLIB_SYMLINK2_VERSION=${LIBFWBUILDER_CURRENT}
# Data format version
FWBUILDER_XML_VERSION=17

View File

@ -11,6 +11,234 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
dnl ______ /usr/share/aclocal/Installed_Packages/acx_pthread.m4 ______
dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
dnl
dnl This macro figures out how to build C programs using POSIX
dnl threads. It sets the PTHREAD_LIBS output variable to the threads
dnl library and linker flags, and the PTHREAD_CFLAGS output variable
dnl to any special C compiler flags that are needed. (The user can also
dnl force certain compiler flags/libs to be tested by setting these
dnl environment variables.)
dnl
dnl Also sets PTHREAD_CC to any special C compiler that is needed for
dnl multi-threaded programs (defaults to the value of CC otherwise).
dnl (This is necessary on AIX to use the special cc_r compiler alias.)
dnl
dnl If you are only building threads programs, you may wish to
dnl use these variables in your default LIBS, CFLAGS, and CC:
dnl
dnl LIBS="$PTHREAD_LIBS $LIBS"
dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
dnl CC="$PTHREAD_CC"
dnl
dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE
dnl to that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
dnl
dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands
dnl to run it if it is not found. If ACTION-IF-FOUND is not specified,
dnl the default action will define HAVE_PTHREAD.
dnl
dnl Please let the authors know if this macro fails on any platform,
dnl or if you have any other suggestions or comments. This macro was
dnl based on work by SGJ on autoconf scripts for FFTW (www.fftw.org)
dnl (with help from M. Frigo), as well as ac_pthread and hb_pthread
dnl macros posted by AFC to the autoconf macro repository. We are also
dnl grateful for the helpful feedback of numerous users.
dnl
dnl @version %Id: acx_pthread.m4,v 1.3 2002/12/12 23:15:12 guidod Exp %
dnl @author Steven G. Johnson <stevenj@alum.mit.edu> and Alejandro Forero Cuervo <bachue@bachue.com>
AC_DEFUN([ACX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_LANG_SAVE
AC_LANG_C
acx_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h
# requires special compiler flags (e.g. on True64 or Sequent).
# It gets checked for in the link test anyway.
# First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using
# them:
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
AC_MSG_RESULT($acx_pthread_ok)
if test x"$acx_pthread_ok" = xno; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
fi
# We must check for the threads library under a number of different
# names; the ordering is very important because some systems
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX).
# Create a list of thread flags to try. Items starting with a "-" are
# C compiler flags, and other items are library names, except for "none"
# which indicates that we try without any flags at all.
acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
# pthreads: AIX (must check this before -lpthread)
# none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
# -pthreads: Solaris/gcc
# -mthreads: Mingw32/gcc, Lynx/gcc
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads too;
# also defines -D_REENTRANT)
# pthread: Linux, etcetera
# --thread-safe: KAI C++
case "${host_cpu}-${host_os}" in
*solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
# tests will erroneously succeed. (We need to link with -pthread or
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
# a function called by this macro, so we could check for that, but
# who knows whether they'll stub that too in a future libc.) So,
# we'll just look for -pthreads and -lpthread first:
acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
;;
esac
if test x"$acx_pthread_ok" = xno; then
for flag in $acx_pthread_flags; do
case $flag in
none)
AC_MSG_CHECKING([whether pthreads work without any flags])
;;
-*)
AC_MSG_CHECKING([whether pthreads work with $flag])
PTHREAD_CFLAGS="$flag"
;;
*)
AC_MSG_CHECKING([for the pthreads library -l$flag])
PTHREAD_LIBS="-l$flag"
;;
esac
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Check for various functions. We must include pthread.h,
# since some functions may be macros. (On the Sequent, we
# need a special flag -Kthread to make this header compile.)
# We check for pthread_join because it is in -lpthread on IRIX
# while pthread_create is in libc. We check for pthread_attr_init
# due to DEC craziness with -lpthreads. We check for
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
AC_TRY_LINK([#include <pthread.h>],
[pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[acx_pthread_ok=yes])
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
AC_MSG_RESULT($acx_pthread_ok)
if test "x$acx_pthread_ok" = xyes; then
break;
fi
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi
# Various other checks:
if test "x$acx_pthread_ok" = xyes; then
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Detect AIX lossage: threads are created detached by default
# and the JOINABLE attribute has a nonstandard name (UNDETACHED).
AC_MSG_CHECKING([for joinable pthread attribute])
AC_TRY_LINK([#include <pthread.h>],
[int attr=PTHREAD_CREATE_JOINABLE;],
ok=PTHREAD_CREATE_JOINABLE, ok=unknown)
if test x"$ok" = xunknown; then
AC_TRY_LINK([#include <pthread.h>],
[int attr=PTHREAD_CREATE_UNDETACHED;],
ok=PTHREAD_CREATE_UNDETACHED, ok=unknown)
fi
if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok,
[Define to the necessary symbol if this constant
uses a non-standard name on your system.])
fi
AC_MSG_RESULT(${ok})
if test x"$ok" = xunknown; then
AC_MSG_WARN([we do not know how to create joinable pthreads])
fi
AC_MSG_CHECKING([if more special flags are required for pthreads])
flag=no
case "${host_cpu}-${host_os}" in
*-aix* | *-freebsd*) flag="-D_THREAD_SAFE";;
*solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
esac
AC_MSG_RESULT(${flag})
if test "x$flag" != xno; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# More AIX lossage: must compile with cc_r
AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
else
PTHREAD_CC="$CC"
fi
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_CC)
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$acx_pthread_ok" = xyes; then
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
:
else
acx_pthread_ok=no
$2
fi
AC_LANG_RESTORE
])dnl ACX_PTHREAD
dnl
dnl AM_PATH_CPPUNIT(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl

291
acsite.m4 Normal file
View File

@ -0,0 +1,291 @@
dnl
dnl $Id: acsite.m4 808 2004-09-08 05:34:53Z vkurland $
dnl
dnl Test files
define( [AC_TEST_FILES],
[
ac_file_found=yes
for f in $1; do
if test ! -f $2/$f; then
ac_file_found=no
break;
fi
done
if test "$ac_file_found" = "yes" ; then
ifelse([$3], , :,[$3])
else
ifelse([$4], , :,[$4])
fi
])
dnl Search for headers, add path to CPPFLAGS if found
define( [AC_SEARCH_HEADERS],
[
AC_MSG_CHECKING("for $1")
ac_hdr_found=no
for p in $2; do
AC_TEST_FILES($1, $p,
[
ac_hdr_found=yes
break
]
)
done
if test "$ac_hdr_found" = "yes" ; then
CPPFLAGS="$CPPFLAGS -I$p"
AC_MSG_RESULT( [($p) yes] )
ifelse([$3], , :,[$3])
else
AC_MSG_RESULT("no")
ifelse([$4], , :,[$4])
fi
])
dnl checks for ucd-snmp or netsnmp library and sets
dnl vars LIBSNMP_LIBS and HAVE_LIBSNMP
dnl
dnl call like this:
dnl AC_CHECK_LIBSNMP ( snmp )
dnl AC_CHECK_LIBSNMP ( netsnmp )
dnl
define( [AC_CHECK_LIBSNMP],
[
ac_snmplib_name="$1"
ac_snmplib_name=`echo ${ac_snmplib_name} | tr -d " "`
AC_CHECK_LIB($ac_snmplib_name, init_snmp,
[
LIBSNMP_LIBS="-l$ac_snmplib_name"
HAVE_LIBSNMP="1"
AC_DEFINE(HAVE_LIBSNMP)
],[
if test "${ac_cv_lib_snmp_init_snmp+set}" = "set"; then
unset ac_cv_lib_snmp_init_snmp
fi
save_LIBS="$LIBS"
LIBS="$LIBS -lcrypto"
AC_CHECK_LIB($ac_snmplib_name, init_snmp,
[
LIBS="$save_LIBS"
LIBSNMP_LIBS="-lcrypto -l$ac_snmplib_name"
HAVE_LIBSNMP="1"
AC_DEFINE(HAVE_LIBSNMP)
],[
echo
dnl if test "${ac_cv_lib_snmp_init_snmp+set}" = "set"; then
dnl unset ac_cv_lib_snmp_init_snmp
dnl fi
dnl
dnl save_LIBS="$LIBS"
dnl LIBS="$LIBS -ldes"
dnl AC_CHECK_LIB($ac_snmplib_name, init_snmp,
dnl [
dnl LIBS="$save_LIBS"
dnl LIBSNMP_LIBS="-ldes -l$ac_snmplib_name"
dnl HAVE_LIBSNMP="1"
dnl AC_DEFINE(HAVE_LIBSNMP)
dnl ])
])
])
dnl if test "Z$HAVE_LIBSNMP" != "Z"; then
dnl AC_CHECK_LIB($ac_snmplib_name, snprint_objid, [
dnl AC_DEFINE(HAVE_SNPRINT_OBJID)
dnl ])
dnl fi
])
define( [AC_CHECK_GETHOSTBYNAME_R],
[
ac_define_this="$1"
if test -z "$ac_define_this"; then ac_define_this="__FWB_DUMMY__"; fi
AC_MSG_CHECKING(if gethostbyname_r takes 3 arguments)
AC_TRY_COMPILE([
#define $ac_define_this
#include <netdb.h>
],[
char *name;
struct hostent *he;
struct hostent_data data;
(void) gethostbyname_r(name, he, &data);
],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_FUNC_GETHOSTBYNAME_R_3)
ac_cv_func_which_gethostname_r="3",
[
dnl ac_cv_func_which_gethostname_r=no
AC_MSG_RESULT(no)
AC_MSG_CHECKING(if gethostbyname_r takes 6 arguments)
AC_TRY_COMPILE([
#define $ac_define_this
#include <netdb.h>
],[
char *name;
struct hostent *he, *res;
char buffer[2048];
int buflen = 2048;
int h_errnop;
(void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_FUNC_GETHOSTBYNAME_R_6)
ac_cv_func_which_gethostname_r="6",
[
dnl ac_cv_func_which_gethostname_r=no
AC_MSG_RESULT(no)
AC_MSG_CHECKING(if gethostbyname_r takes 5 arguments)
AC_TRY_COMPILE([
#define $ac_define_this
#include <netdb.h>
],[
char *name;
struct hostent *he;
char buffer[2048];
int buflen = 2048;
int h_errnop;
(void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_FUNC_GETHOSTBYNAME_R_5)
ac_cv_func_which_gethostname_r="5",
[
AC_MSG_RESULT(no)
ac_cv_func_which_gethostname_r=no])
])
] ,ac_cv_func_which_gethostname_r=no)
])
dnl check for number of arguments to gethostbyaddr_r. it might take
dnl 5, 7, or 8 arguments.
define( [AC_CHECK_GETHOSTBYADDR_R],
[
ac_define_this="$1"
if test -z "$ac_define_this"; then ac_define_this="__FWB_DUMMY__"; fi
AC_MSG_CHECKING(if gethostbyaddr_r takes 5 arguments)
AC_TRY_COMPILE([
#define $ac_define_this
#include <sys/types.h>
#include <netdb.h>
],[
char * address;
int length;
int type;
struct hostent h;
struct hostent_data hdata;
int rc;
rc = gethostbyaddr_r(address, length, type, &h, &hdata);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GETHOSTBYADDR_R_5)
ac_cv_gethostbyaddr_args=5
],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING(if gethostbyaddr_r takes 7 arguments)
AC_TRY_COMPILE([
#define $ac_define_this
#include <sys/types.h>
#include <netdb.h>
],[
char * address;
int length;
int type;
struct hostent h;
char buffer[8192];
int h_errnop;
struct hostent * hp;
hp = gethostbyaddr_r(address, length, type, &h,
buffer, 8192, &h_errnop);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GETHOSTBYADDR_R_7)
ac_cv_gethostbyaddr_args=7
],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING(if gethostbyaddr_r takes 8 arguments and first arg is (in_addr*))
AC_TRY_COMPILE([
#define $ac_define_this
#include <sys/types.h>
#include <netdb.h>
],[
struct in_addr *address;
int length;
int type;
struct hostent h;
char buffer[8192];
int h_errnop;
struct hostent * hp;
int rc;
rc = gethostbyaddr_r(address, length, type, &h,
buffer, 8192, &hp, &h_errnop);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GETHOSTBYADDR_R_8)
AC_DEFINE(GETHOSTBYADDR_FIRST_ARG_VOIDPTR)
ac_cv_gethostbyaddr_first_arg="voidptr"
ac_cv_gethostbyaddr_args=8
],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING(if gethostbyaddr_r takes 8 arguments and first arg is (char*))
AC_TRY_COMPILE([
#define $ac_define_this
#include <sys/types.h>
#include <netdb.h>
],[
char * address;
int length;
int type;
struct hostent h;
char buffer[8192];
int h_errnop;
struct hostent * hp;
int rc;
rc = gethostbyaddr_r(address, length, type, &h,
buffer, 8192, &hp, &h_errnop);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GETHOSTBYADDR_R_8)
AC_DEFINE(GETHOSTBYADDR_FIRST_ARG_CHARPTR)
ac_cv_gethostbyaddr_first_arg="charptr"
ac_cv_gethostbyaddr_args=8
],[
AC_MSG_RESULT(no)
have_missing_r_funcs="$have_missing_r_funcs gethostbyaddr_r"
ac_cv_gethostbyaddr_args=no
])
])
])
])
])
])

View File

@ -1,6 +1,8 @@
#include "VERSION.h"
#undef BUILD_NUM
#undef PACKAGE_LOCALE_DIR
#undef PACKAGE_DATA_DIR
#undef PACKAGE_SOURCE_DIR

View File

@ -4,6 +4,7 @@ AC_INIT
AC_CONFIG_SRCDIR([src/gui/main.cpp])
AC_CANONICAL_TARGET
AC_CONFIG_HEADER(config.h)
AC_CONFIG_HEADER(src/libfwbuilder/src/fwbuilder/libfwbuilder-config.h)
PACKAGE=fwbuilder
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [package])
@ -17,20 +18,50 @@ dnl all version numbers are defined in the file VERSION
dnl
. ./VERSION
BUILD_NUM=`cat build_num | cut -d' ' -f3`
# RELEASE number (== build number) is taken from the file build_num if
# it exists If the file is not there, we construct it from git branch
# and commit
test -f build_num && {
. build_num
} || {
BUILD_NUM="999999"
}
RELEASE_NUM=$BUILD_NUM
AC_DEFINE_UNQUOTED(BUILD_NUM, "$BUILD_NUM")
AC_SUBST(BUILD_NUM)
AC_SUBST(RELEASE_NUM)
AC_SUBST(FWB_MAJOR_VERSION)
AC_SUBST(FWB_MINOR_VERSION)
AC_SUBST(FWB_MICRO_VERSION)
AC_SUBST(FWB_VERSION)
# libfwbuilder versions
AC_SUBST(LIBMAJOR)
AC_SUBST(LIBFWBUILDER_SO_VERSION)
AC_SUBST(LIBFWBUILDER_SOLIB_VERSION)
AC_SUBST(LIBFWBUILDER_VERSION)
#AC_SUBST(LIBFWBUILDER_LIB_VER)
AC_SUBST(LIBFWBUILDER_SOLIB_SYMLINK1_VERSION)
AC_SUBST(LIBFWBUILDER_SOLIB_SYMLINK2_VERSION)
AC_SUBST(FWBUILDER_XML_VERSION)
SHORTVERSION=${FWB_MAJOR_VERSION}${FWB_MINOR_VERSION}${FWB_MICRO_VERSION}
AC_SUBST(SHORTVERSION)
LIBFWBUILDER_FORMAT_VERSION="${LIBFWBUILDER_VERSION}"
AC_DEFINE_UNQUOTED(LIBFWBUILDER_FORMAT_VERSION, "${LIBFWBUILDER_FORMAT_VERSION}")
echo "Creating VERSION.h file..."
echo "#define VERSION \"$VERSION\"" > VERSION.h
echo "Creating libfwbuilder-version.h file..."
echo "#define LIBFWBUILDER_VERSION \"$LIBFWBUILDER_VERSION\"" > src/libfwbuilder/src/fwbuilder/libfwbuilder-version.h
echo "#define LIBFWBUILDER_FORMAT_VERSION \"$FWBUILDER_XML_VERSION\"" >> src/libfwbuilder/src/fwbuilder/libfwbuilder-version.h
dnl try to find QT
dnl
AC_ARG_WITH(qtdir,[ --with-qtdir=DIR Specify directory path for QT ])
@ -76,6 +107,12 @@ AC_ARG_WITH(docdir, [ --with-docdir=DIR Specify directory path for f
AC_ARG_WITH(datadir, [ --with-datadir=DIR Specify directory path for fwbuilder
data files ])
AC_C_BIGENDIAN(AC_DEFINE(WORDS_BIGENDIAN),
AC_DEFINE(WORDS_LITTLEENDIAN),
AC_MSG_ERROR(Failed to determine endianness!!))
LIBFWBUILDER_LIBDIR='-L${libdir}'
dnl
@ -184,6 +221,9 @@ dnl AC_PROG_RANLIB
AC_CHECK_HEADERS([getopt.h])
AC_CHECK_HEADERS([signal.h])
AC_CHECK_HEADERS([endian.h])
AC_CHECK_FUNCS(strtok_r)
AC_CHECK_FUNCS(stat _stat signal)
@ -204,43 +244,6 @@ AC_DEFINE_UNQUOTED(CI_FILE_NAME, ["$CI_FILE_NAME"], [ci_file_name])
AC_DEFINE_UNQUOTED(CO_FILE_NAME, ["$CO_FILE_NAME"], [co_file_name])
AC_PATH_PROG(LIBFWBUILDER_CONFIG, libfwbuilder-config-${FWB_MAJOR_VERSION}, ,[$EXTENDED_PATH])
if test x$LIBFWBUILDER_CONFIG = x ; then
AC_MSG_ERROR([*** libfwbuilder not installed, or libfwbuilder-config-${FWB_MAJOR_VERSION} is not in path])
else
LIBFWBUILDER_CFLAGS_FWBUILDER="`$LIBFWBUILDER_CONFIG --cflags fwbuilder`"
LIBFWBUILDER_CFLAGS_FWCOMPILER="`$LIBFWBUILDER_CONFIG --cflags fwcompiler`"
LIBFWBUILDER_CFLAGS_FWBD="`$LIBFWBUILDER_CONFIG --cflags fwbd`"
LIBFWBUILDER_INCLUDEPATH="`$LIBFWBUILDER_CONFIG --includepath`"
LIBFWBUILDER_LIBPATH="`$LIBFWBUILDER_CONFIG --libpath`"
LIBFWBUILDER_LIBS_FWBUILDER="`$LIBFWBUILDER_CONFIG --libs fwbuilder`"
LIBFWBUILDER_LIBS_FWCOMPILER="`$LIBFWBUILDER_CONFIG --libs fwcompiler`"
LIBFWBUILDER_LIBS_FWBD="`$LIBFWBUILDER_CONFIG --libs fwbd`"
LIBFWBUILDER_STATICLIBS="`$LIBFWBUILDER_CONFIG --staticlibs`"
LIBFWBUILDER_VERSION="`$LIBFWBUILDER_CONFIG --version`"
FWBUILDER_XML_VERSION="`$LIBFWBUILDER_CONFIG --xml_version`"
AC_MSG_CHECKING(libfwbuilder version)
if test x${LIBFWBUILDER_VERSION} != x${REQUIRED_LIBFWBUILDER_VERSION} ; then
AC_MSG_ERROR([*** Need libfwbuilder version $REQUIRED_LIBFWBUILDER_VERSION, found $LIBFWBUILDER_VERSION ])
fi
AC_MSG_RESULT($LIBFWBUILDER_VERSION)
AC_SUBST(LIBFWBUILDER_CFLAGS_FWBUILDER)
AC_SUBST(LIBFWBUILDER_CFLAGS_FWCOMPILER)
AC_SUBST(LIBFWBUILDER_LIBS_FWBUILDER)
AC_SUBST(LIBFWBUILDER_LIBS_FWCOMPILER)
AC_SUBST(LIBFWBUILDER_LIBPATH)
AC_SUBST(LIBFWBUILDER_INCLUDEPATH)
AC_SUBST(LIBFWBUILDER_STATICLIBS)
AC_SUBST(LIBFWBUILDER_VERSION)
AC_SUBST(FWBUILDER_XML_VERSION)
fi
AC_DEFINE_UNQUOTED(LIBFWBUILDER_VERSION, "$LIBFWBUILDER_VERSION", [libfwbuilder_version])
AC_SUBST(LIBS)
AC_LANG([C++])
@ -265,6 +268,221 @@ ANTLR_LIBS="`pwd`/src/antlr/libantlr.a"
AC_SUBST(ANTLR_LIBS)
AC_SUBST(ANTLR_INCLUDEPATH)
dnl check for pthreads
dnl
dnl Somehow, standard macro tries -lpthreads, while pthread library really
dnl is "libpthread" on Linux. Thus only test using -pthread suceeds, but
dnl PTHREAD_LIBS macro ends up empty.
ACX_PTHREAD([
test -z "$PTHREAD_LIBS" && test "$PTHREAD_CFLAGS" = "-pthread" && PTHREAD_LIBS="-pthread"
echo "Found pthread library:"
echo "PTHREAD_CFLAGS="$PTHREAD_CFLAGS
echo "PTHREAD_LIBS="$PTHREAD_LIBS
] , [
AC_MSG_ERROR([POSIX threads library not present or not configured])
])
dnl check for XML library
AC_PATH_PROG(XML2_CONFIG, xml2-config, ,[$EXTENDED_PATH])
if test x$XML2_CONFIG = x ; then
AC_MSG_ERROR([libxml2 not present or not configured])
else
XML_CFLAGS="`$XML2_CONFIG --cflags`"
XML_LIBS="`$XML2_CONFIG --libs`"
fi
XML_CFLAGS=`echo $XML_CFLAGS | sed 's/-I\/usr\/include //'`
AC_SUBST(XML_CFLAGS)
AC_SUBST(XML_LIBS)
SAVE_LIBS=${LIBS}
LIBS="$XML_LIBS $LIBS"
AC_CHECK_FUNCS(xmlSaveFormatFileEnc)
LIBS=${SAVE_LIBS}
dnl check for XSLT library
AC_PATH_PROG(XSLT_CONFIG, xslt-config, ,[$EXTENDED_PATH])
if test x$XSLT_CONFIG = x ; then
AC_MSG_ERROR([libxslt not present or not configured])
else
XSLT_CFLAGS="`$XSLT_CONFIG --cflags`"
XSLT_LIBS="`$XSLT_CONFIG --libs`"
fi
XSLT_CFLAGS=`echo $XSLT_CFLAGS | sed 's/-I\/usr\/include //'`
dnl
dnl purely aestetical: xslt-config often reports the same flags as
dnl xml2-config
dnl
ac_xslt_var=""
for w in ${XSLT_CFLAGS}; do
case " ${XML_CFLAGS} " in
*\ $w\ *) ;;
*) ac_xslt_var="$ac_xslt_var $w" ;;
esac
done
XSLT_CFLAGS=$ac_xslt_var
ac_xslt_var=""
for w in ${XSLT_LIBS}; do
case " ${XML_LIBS} " in
*\ $w\ *) ;;
*) ac_xslt_var="$ac_xslt_var $w" ;;
esac
done
XSLT_LIBS=$ac_xslt_var
AC_SUBST(XSLT_CFLAGS)
AC_SUBST(XSLT_LIBS)
dnl libXslt header libxslt/xsltconfig.h only present in newew version of libxslt
dnl for instance it is not part of 1.0.1 but present in 1.0.7.
AC_CHECK_HEADERS(libxslt/xsltconfig.h)
dnl Check for bind specific headers and libraries
dnl if they are present, use them, rather than ones
dnl coming with libc.
AC_CHECK_HEADER(bind/resolv.h, [
CPPFLAGS="$CPPFLAGS -I/usr/include/bind"
HAVE_RESOLV_H=yes
] , [ AC_CHECK_HEADER(/usr/local/bind/include/resolv.h, [
CPPFLAGS="$CPPFLAGS -I/usr/local/bind/include/"
HAVE_RESOLV_H=yes
], [
AC_CHECK_HEADERS([resolv.h], [ HAVE_RESOLV_H=yes ], [], [
#include <sys/types.h>
#include <netinet/in.h>
] )
] )
], [
#include <netinet/in.h>
] )
LIB_RESOLV=""
HAVE_RES_NQUERY=""
AC_SUBST(LIB_RESOLV)
dnl
dnl prepare equivalents of *_CFLAGS variables for qmake
dnl qmake requires these to be without "-I"
dnl
XML_CFLAGS_Q=`echo ${XML_CFLAGS} | sed 's/-I//g'`
XSLT_CFLAGS_Q=`echo ${XSLT_CFLAGS} | sed 's/-I//g'`
PTHREAD_CFLAGS_Q=`echo ${PTHREAD_CFLAGS} | sed 's/-I//g'`
LIBS_Q=`echo ${LIBS} | sed 's/-I//g'`
AC_SUBST(XML_CFLAGS_Q)
AC_SUBST(XSLT_CFLAGS_Q)
AC_SUBST(PTHREAD_CFLAGS_Q)
AC_SUBST(LIBS_Q)
dnl
dnl We also support "--with-ucdsnmp=no" and "--without-ucdsnmp"
dnl By default we assume user wants snmp support, provided script
dnl can find the library
dnl
dnl Just in case we support both --with-ucdsnmp and --with-ucd-snmp
dnl --vk
dnl
check_for_ucdsnmp=yes
if test x$with_ucdsnmp = xno ; then
check_for_ucdsnmp=no
fi
if test x$with_ucd_snmp = xno ; then
check_for_ucdsnmp=no
fi
if test $check_for_ucdsnmp = yes ; then
dnl
dnl net-snmp library includes script net-snmp-config which I use to determine cflags
dnl and libs. Unfortunately even if this script is there and is used flags,
dnl the program may still not link with the library. Currently having this problem on
dnl FreeBSD 4.7 - after upgrade of openssl, code using net-snmp stopped linking. That
dnl is why I still try to do linking test even if script is present.
dnl
dnl Testing for presence of includes and doing linking test assures that -devel
dnl package is indeed installed (primitive test program could link with libsnmp.so
dnl even if -devel package is not installed and headers are not there).
dnl
AC_PATH_PROG(NET_SNMP_CONFIG, net-snmp-config, ,[$EXTENDED_PATH])
if test x$NET_SNMP_CONFIG != x ; then
ac_LIBSNMP_LIBS="`$NET_SNMP_CONFIG --libs`"
ac_LIBSNMP_CFLAGS="`$NET_SNMP_CONFIG --cflags`"
AC_CHECK_LIB(netsnmp, init_snmp,
[
HAVE_LIBSNMP="1"
AC_DEFINE(HAVE_LIBSNMP)
NET_SNMP="1"
AC_DEFINE(NET_SNMP)
LIBSNMP_LIBS=$ac_LIBSNMP_LIBS
LIBSNMP_CFLAGS=$ac_LIBSNMP_CFLAGS
AC_CHECK_LIB(netsnmp, snprint_objid, [
AC_DEFINE(HAVE_SNPRINT_OBJID)
], ,$ac_LIBSNMP_LIBS)
], ,$ac_LIBSNMP_LIBS)
else
AC_CHECK_HEADERS([ucd-snmp/asn1.h], [
AC_CHECK_HEADER(ucd-snmp/snmp.h, [
AC_CHECK_LIBSNMP( snmp )
if test "Z$HAVE_LIBSNMP" != "Z"; then
UCD_SNMP="1"
AC_DEFINE(UCD_SNMP)
save_LIBS=$LIBS
LIBS="$LIBSNMP_LIBS $LIBS"
AC_CHECK_LIB(snmp, snprint_objid, [
AC_DEFINE(HAVE_SNPRINT_OBJID)
])
LIBS=$save_LIBS
fi
], ,[
#include <sys/types.h>
#include <ucd-snmp/asn1.h>
])
])
fi
LIBS="${LIBSNMP_LIBS} ${LIBS}"
fi
AC_SUBST(LIBSNMP_LIBS)
AC_CHECK_LIB(c, inet_net_ntop, [
AC_DEFINE_UNQUOTED(HAVE_INET_NET_NTOP, 1, [inet_net_ntop])
],[
AC_CHECK_LIB(bind, inet_net_ntop, [
AC_DEFINE_UNQUOTED(HAVE_INET_NET_NTOP, 1, [inet_net_ntop])
LIBS="-lbind $LIBS"
])
],[])
AC_CHECK_LIB(z, gzopen, [ LIBS="-lz ${LIBS}"], [
AC_MSG_ERROR([libz library not found])
])
dnl
dnl Determine init dir and add definition to config.h
dnl
PREFIX=$ac_default_prefix
if test "x$prefix" != "xNONE"; then
PREFIX=$prefix
fi
# TODO: Probably need to repackage this as Autoconf macro.
#
# QT DBus framework is not always available. It is not included in QT
@ -415,6 +633,18 @@ fi
AC_DEFINE_UNQUOTED(RES_DIR, "$RES_DIR", [res_dir])
AC_SUBST(RES_DIR)
dnl prefix has bogus value while building RPM. Since program
dnl should incrorporate full path to the templates directory into
dnl the code via config.h file, we need to keep track of
dnl this directory twice: TEMPLATE_DIR is what goes to config.h, while
dnl "install" Makefile targets will use $(prefix) to build install
dnl path
TEMPLATE_DIR=$RES_DIR
AC_DEFINE_UNQUOTED(LIBFWBUILDER_TEMPLATE_DIR, "${TEMPLATE_DIR}")
AC_SUBST(TEMPLATE_DIR)
AC_SUBST(OS)
AC_DEFINE_UNQUOTED(OS, "${OS}", [os])
test -n "$OS_CYGWIN" && AC_DEFINE_UNQUOTED(OS_CYGWIN, "${OS_CYGWIN}", [cygwin])
@ -474,11 +704,14 @@ else
fi
fi
AC_CONFIG_FILES([ qmake.inc ])
AC_CONFIG_FILES([ src/res/objects_init.xml ])
AC_CONFIG_FILES([ src/res/templates.xml ])
AC_CONFIG_FILES([ qmake.inc
src/res/objects_init.xml
src/res/templates.xml
src/libfwbuilder/qmake.inc
src/libfwbuilder/etc/fwbuilder.dtd
packaging/fwbuilder.control
packaging/fwbuilder.spec
packaging/fwbuilder-static-qt.spec])
AC_OUTPUT

View File

@ -0,0 +1,106 @@
# .spec file for statically linked fwbuilder rpm for CentOS 5.2
%define name fwbuilder
%define version 4.1.4
%define release 999999
%if "%_vendor" == "MandrakeSoft"
%define guigroup System/Configuration/Networking
%define compgroup System/Configuration/Networking
%else
%define guigroup Applications/System
%define compgroup Applications/System
%endif
Summary: Firewall Builder
Name: %{name}
Version: %{version}
Release: %{release}%{?dist}
License: GPL2
Vendor: NetCitadel LLC., http://sourceforge.net/project/showfiles.php?group_id=5314
Group: %{guigroup}
Url: http://www.fwbuilder.org/
Source: http://prdownloads.sourceforge.net/fwbuilder/%{name}-%{version}.tar.gz
Packager: Vadim Kurland <vadim@fwbuilder.org>
Buildroot: %{_tmppath}/%{name}-%{version}-root
Requires: libfwbuilder = @REQUIRED_LIBFWBUILDER_VERSION@
BuildRequires: libfwbuilder-devel = @REQUIRED_LIBFWBUILDER_VERSION@
BuildRequires: libxml2-devel, libxslt-devel, openssl-devel
Obsoletes: fwbuilder-ipt, fwbuilder-pf, fwbuilder-ipf, fwbuilder-ipfw, fwbuilder-pix, fwbuilder-iosacl, fwbuilder-cisco
Docdir: /usr/share/doc
%description
Firewall Builder consists of a GUI and set of policy compilers for
various firewall platforms. It helps users maintain a database of
objects and allows policy editing using simple drag-and-drop
operations. GUI generates firewall description in the form of XML
file, which compilers then interpret and generate platform-specific
code. Several algorithms are provided for automated network objects
discovery and bulk import of data. The GUI and policy compilers are
completely independent, this provides for a consistent abstract model
and the same GUI for different firewall platforms.
%prep
%setup
./autogen.sh
%build
%configure --with-qtdir=/opt/qt44
make -j5 all
%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
make INSTALL_ROOT="${RPM_BUILD_ROOT}/" install
rm -fr $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}
%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%dir /usr/share/fwbuilder-%version
/usr/share/fwbuilder-%version
/usr/bin/fwbuilder
/usr/bin/fwbedit
/usr/bin/fwb_iosacl
/usr/bin/fwb_ipf
/usr/bin/fwb_ipfw
/usr/bin/fwb_ipt
/usr/bin/fwb_pf
/usr/bin/fwb_pix
/usr/bin/fwb_procurve_acl
/usr/bin/transfer_secuwall
%doc doc/AUTHORS
%doc doc/COPYING
%doc doc/Credits
%doc doc/ChangeLog
%doc doc/PatchAcceptancePolicy.txt
%doc doc/README.floppyfw
%doc doc/README.iosacl
%doc doc/README.ipf
%doc doc/README.ipfw
%doc doc/README.ipt
%doc doc/README.pf
%doc doc/README.pix
%doc doc/README.pix_routing
%doc doc/README.routing
%doc doc/README.policy_import
%doc doc/README.iosacl
%doc doc/FWBuilder-Routing-LICENSE.txt
%{_mandir}/man1/fwbuilder.1*
%{_mandir}/man1/fwbedit.1*
%{_mandir}/man1/fwb_iosacl.1*
%{_mandir}/man1/fwb_ipf.1*
%{_mandir}/man1/fwb_ipfw.1*
%{_mandir}/man1/fwb_ipt.1*
%{_mandir}/man1/fwb_pf.1*
%{_mandir}/man1/fwb_pix.1*
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/apps/%name.png

View File

@ -0,0 +1,106 @@
# .spec file for statically linked fwbuilder rpm for CentOS 5.2
%define name fwbuilder
%define version @VERSION@
%define release @RELEASE_NUM@
%if "%_vendor" == "MandrakeSoft"
%define guigroup System/Configuration/Networking
%define compgroup System/Configuration/Networking
%else
%define guigroup Applications/System
%define compgroup Applications/System
%endif
Summary: Firewall Builder
Name: %{name}
Version: %{version}
Release: %{release}%{?dist}
License: GPL2
Vendor: NetCitadel LLC., http://sourceforge.net/project/showfiles.php?group_id=5314
Group: %{guigroup}
Url: http://www.fwbuilder.org/
Source: http://prdownloads.sourceforge.net/fwbuilder/%{name}-%{version}.tar.gz
Packager: Vadim Kurland <vadim@fwbuilder.org>
Buildroot: %{_tmppath}/%{name}-%{version}-root
Requires: libfwbuilder = @REQUIRED_LIBFWBUILDER_VERSION@
BuildRequires: libfwbuilder-devel = @REQUIRED_LIBFWBUILDER_VERSION@
BuildRequires: libxml2-devel, libxslt-devel, openssl-devel
Obsoletes: fwbuilder-ipt, fwbuilder-pf, fwbuilder-ipf, fwbuilder-ipfw, fwbuilder-pix, fwbuilder-iosacl, fwbuilder-cisco
Docdir: /usr/share/doc
%description
Firewall Builder consists of a GUI and set of policy compilers for
various firewall platforms. It helps users maintain a database of
objects and allows policy editing using simple drag-and-drop
operations. GUI generates firewall description in the form of XML
file, which compilers then interpret and generate platform-specific
code. Several algorithms are provided for automated network objects
discovery and bulk import of data. The GUI and policy compilers are
completely independent, this provides for a consistent abstract model
and the same GUI for different firewall platforms.
%prep
%setup
./autogen.sh
%build
%configure --with-qtdir=/opt/qt44
make -j5 all
%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
make INSTALL_ROOT="${RPM_BUILD_ROOT}/" install
rm -fr $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}
%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%dir /usr/share/fwbuilder-%version
/usr/share/fwbuilder-%version
/usr/bin/fwbuilder
/usr/bin/fwbedit
/usr/bin/fwb_iosacl
/usr/bin/fwb_ipf
/usr/bin/fwb_ipfw
/usr/bin/fwb_ipt
/usr/bin/fwb_pf
/usr/bin/fwb_pix
/usr/bin/fwb_procurve_acl
/usr/bin/transfer_secuwall
%doc doc/AUTHORS
%doc doc/COPYING
%doc doc/Credits
%doc doc/ChangeLog
%doc doc/PatchAcceptancePolicy.txt
%doc doc/README.floppyfw
%doc doc/README.iosacl
%doc doc/README.ipf
%doc doc/README.ipfw
%doc doc/README.ipt
%doc doc/README.pf
%doc doc/README.pix
%doc doc/README.pix_routing
%doc doc/README.routing
%doc doc/README.policy_import
%doc doc/README.iosacl
%doc doc/FWBuilder-Routing-LICENSE.txt
%{_mandir}/man1/fwbuilder.1*
%{_mandir}/man1/fwbedit.1*
%{_mandir}/man1/fwb_iosacl.1*
%{_mandir}/man1/fwb_ipf.1*
%{_mandir}/man1/fwb_ipfw.1*
%{_mandir}/man1/fwb_ipt.1*
%{_mandir}/man1/fwb_pf.1*
%{_mandir}/man1/fwb_pix.1*
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/apps/%name.png

View File

@ -0,0 +1,9 @@
Package: fwbuilder
Conflicts: fwbuilder (<=4.1.1-1), fwbuilder-common, fwbuilder-bsd, fwbuilder-linux, fwbuilder-doc
Replaces: fwbuilder (<=4.1.1-1), fwbuilder-common, fwbuilder-bsd, fwbuilder-linux, fwbuilder-doc
Priority: extra
Section: checkinstall
Maintainer: vadim@fwbuilder.org
Version: 4.1.4-999999
Depends: libfwbuilder, libqt4-gui (>= 4.3.0), libxml2, libxslt1.1, libsnmp | libsnmp15
Description: Firewall Builder GUI and policy compilers

View File

@ -0,0 +1,9 @@
Package: fwbuilder
Conflicts: fwbuilder (<=4.1.1-1), fwbuilder-common, fwbuilder-bsd, fwbuilder-linux, fwbuilder-doc
Replaces: fwbuilder (<=4.1.1-1), fwbuilder-common, fwbuilder-bsd, fwbuilder-linux, fwbuilder-doc
Priority: extra
Section: checkinstall
Maintainer: vadim@fwbuilder.org
Version: @VERSION@-@RELEASE_NUM@
Depends: libfwbuilder, libqt4-gui (>= 4.3.0), libxml2, libxslt1.1, libsnmp | libsnmp15
Description: Firewall Builder GUI and policy compilers

108
packaging/fwbuilder.spec Normal file
View File

@ -0,0 +1,108 @@
%define name fwbuilder
%define version 4.1.4
%define release 999999
%if "%_vendor" == "MandrakeSoft"
%define guigroup System/Configuration/Networking
%define compgroup System/Configuration/Networking
%else
%define guigroup Applications/System
%define compgroup Applications/System
%endif
Summary: Firewall Builder
Name: %{name}
Version: %{version}
Release: %{release}%{?dist}
License: GPL2
Vendor: NetCitadel LLC., http://sourceforge.net/project/showfiles.php?group_id=5314
Group: %{guigroup}
Url: http://www.fwbuilder.org/
Source: http://prdownloads.sourceforge.net/fwbuilder/%{name}-%{version}.tar.gz
Packager: Vadim Kurland <vadim@fwbuilder.org>
Buildroot: %{_tmppath}/%{name}-%{version}-root
Requires: libfwbuilder = @REQUIRED_LIBFWBUILDER_VERSION@-%{release}
BuildRequires: libfwbuilder-devel = @REQUIRED_LIBFWBUILDER_VERSION@-%{release}
BuildRequires: libxml2-devel, libxslt-devel, openssl-devel
%if "%_vendor" == "suse"
BuildRequires: qt-devel
%else
BuildRequires: qt4-devel
%endif
Obsoletes: fwbuilder-ipt, fwbuilder-pf, fwbuilder-ipf, fwbuilder-ipfw, fwbuilder-pix, fwbuilder-iosacl, fwbuilder-cisco
Docdir: /usr/share/doc
%description
Firewall Builder consists of a GUI and set of policy compilers for
various firewall platforms. It helps users maintain a database of
objects and allows policy editing using simple drag-and-drop
operations. GUI generates firewall description in the form of XML
file, which compilers then interpret and generate platform-specific
code. Several algorithms are provided for automated network objects
discovery and bulk import of data. The GUI and policy compilers are
completely independent, this provides for a consistent abstract model
and the same GUI for different firewall platforms.
%prep
%setup
./autogen.sh
%build
%configure
make -j5 all
%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
make INSTALL_ROOT="${RPM_BUILD_ROOT}/" install
rm -fr $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}
%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%dir /usr/share/fwbuilder-%version
/usr/share/fwbuilder-%version
/usr/bin/fwbuilder
/usr/bin/fwbedit
/usr/bin/fwb_iosacl
/usr/bin/fwb_ipf
/usr/bin/fwb_ipfw
/usr/bin/fwb_ipt
/usr/bin/fwb_pf
/usr/bin/fwb_pix
/usr/bin/fwb_procurve_acl
/usr/bin/transfer_secuwall
%doc doc/AUTHORS
%doc doc/COPYING
%doc doc/Credits
%doc doc/ChangeLog
%doc doc/PatchAcceptancePolicy.txt
%doc doc/README.floppyfw
%doc doc/README.iosacl
%doc doc/README.ipf
%doc doc/README.ipfw
%doc doc/README.ipt
%doc doc/README.pf
%doc doc/README.pix
%doc doc/README.pix_routing
%doc doc/README.routing
%doc doc/README.policy_import
%doc doc/README.iosacl
%doc doc/FWBuilder-Routing-LICENSE.txt
%{_mandir}/man1/fwbuilder.1*
%{_mandir}/man1/fwbedit.1*
%{_mandir}/man1/fwb_iosacl.1*
%{_mandir}/man1/fwb_ipf.1*
%{_mandir}/man1/fwb_ipfw.1*
%{_mandir}/man1/fwb_ipt.1*
%{_mandir}/man1/fwb_pf.1*
%{_mandir}/man1/fwb_pix.1*
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/apps/%name.png

108
packaging/fwbuilder.spec.in Normal file
View File

@ -0,0 +1,108 @@
%define name fwbuilder
%define version @VERSION@
%define release @RELEASE_NUM@
%if "%_vendor" == "MandrakeSoft"
%define guigroup System/Configuration/Networking
%define compgroup System/Configuration/Networking
%else
%define guigroup Applications/System
%define compgroup Applications/System
%endif
Summary: Firewall Builder
Name: %{name}
Version: %{version}
Release: %{release}%{?dist}
License: GPL2
Vendor: NetCitadel LLC., http://sourceforge.net/project/showfiles.php?group_id=5314
Group: %{guigroup}
Url: http://www.fwbuilder.org/
Source: http://prdownloads.sourceforge.net/fwbuilder/%{name}-%{version}.tar.gz
Packager: Vadim Kurland <vadim@fwbuilder.org>
Buildroot: %{_tmppath}/%{name}-%{version}-root
Requires: libfwbuilder = @REQUIRED_LIBFWBUILDER_VERSION@-%{release}
BuildRequires: libfwbuilder-devel = @REQUIRED_LIBFWBUILDER_VERSION@-%{release}
BuildRequires: libxml2-devel, libxslt-devel, openssl-devel
%if "%_vendor" == "suse"
BuildRequires: qt-devel
%else
BuildRequires: qt4-devel
%endif
Obsoletes: fwbuilder-ipt, fwbuilder-pf, fwbuilder-ipf, fwbuilder-ipfw, fwbuilder-pix, fwbuilder-iosacl, fwbuilder-cisco
Docdir: /usr/share/doc
%description
Firewall Builder consists of a GUI and set of policy compilers for
various firewall platforms. It helps users maintain a database of
objects and allows policy editing using simple drag-and-drop
operations. GUI generates firewall description in the form of XML
file, which compilers then interpret and generate platform-specific
code. Several algorithms are provided for automated network objects
discovery and bulk import of data. The GUI and policy compilers are
completely independent, this provides for a consistent abstract model
and the same GUI for different firewall platforms.
%prep
%setup
./autogen.sh
%build
%configure
make -j5 all
%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
make INSTALL_ROOT="${RPM_BUILD_ROOT}/" install
rm -fr $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}
%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%dir /usr/share/fwbuilder-%version
/usr/share/fwbuilder-%version
/usr/bin/fwbuilder
/usr/bin/fwbedit
/usr/bin/fwb_iosacl
/usr/bin/fwb_ipf
/usr/bin/fwb_ipfw
/usr/bin/fwb_ipt
/usr/bin/fwb_pf
/usr/bin/fwb_pix
/usr/bin/fwb_procurve_acl
/usr/bin/transfer_secuwall
%doc doc/AUTHORS
%doc doc/COPYING
%doc doc/Credits
%doc doc/ChangeLog
%doc doc/PatchAcceptancePolicy.txt
%doc doc/README.floppyfw
%doc doc/README.iosacl
%doc doc/README.ipf
%doc doc/README.ipfw
%doc doc/README.ipt
%doc doc/README.pf
%doc doc/README.pix
%doc doc/README.pix_routing
%doc doc/README.routing
%doc doc/README.policy_import
%doc doc/README.iosacl
%doc doc/FWBuilder-Routing-LICENSE.txt
%{_mandir}/man1/fwbuilder.1*
%{_mandir}/man1/fwbedit.1*
%{_mandir}/man1/fwb_iosacl.1*
%{_mandir}/man1/fwb_ipf.1*
%{_mandir}/man1/fwb_ipfw.1*
%{_mandir}/man1/fwb_ipt.1*
%{_mandir}/man1/fwb_pf.1*
%{_mandir}/man1/fwb_pix.1*
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/apps/%name.png

View File

@ -4,7 +4,6 @@
#
QTDIR = $$(QTDIR)
TEMPLATE = app
SO_VERSION = @LIBFWBUILDER_SOLIB_VERSION@
DEFINES += $$(DEFINES)
LANGUAGE = C++
UI_DIR = ui
@ -21,29 +20,31 @@ unix {
ANTLR_INCLUDEPATH = @ANTLR_INCLUDEPATH@
ANTLR_LIBS = @ANTLR_LIBS@
FWBPARSER_LIB = ../parsers/libfwbparser.a
FWTRANSFER_LIB = ../fwtransfer/libfwtransfer.a
QMAKE_CXX = @CCACHE@ @DISTCC@ $$QMAKE_CXX
!macx {
INCLUDEPATH += .. ../..
INCLUDEPATH += /usr/include @XML_CFLAGS_Q@ @XSLT_CFLAGS_Q@ @PTHREAD_CFLAGS_Q@
LIBS += @PTHREAD_LIBS@ @XML_LIBS@ @XSLT_LIBS@ @LIBSNMP_LIBS@ @LIB_RESOLV@ @LIBS@
UI_DIR = .ui
MOC_DIR = .moc
OBJECTS_DIR = .obj
UI_DIR = .ui
MOC_DIR = .moc
OBJECTS_DIR = .obj
QMAKE_CFLAGS_DEBUG += -Wno-unused-parameter
QMAKE_CFLAGS_RELEASE += -Wno-unused-parameter
QMAKE_CXXFLAGS_DEBUG += -Wno-unused-parameter
QMAKE_CXXFLAGS_RELEASE += -Wno-unused-parameter
!macx {
exec_prefix = @EXEC_PREFIX@
DESTDIR =
ICONSDIR = @ICONSDIR@
INCLUDEPATH += .. ../.. $$(INCLUDEPATH) @LIBFWBUILDER_INCLUDEPATH@
LIBS_FWCOMPILER = @LIBFWBUILDER_LIBS_FWCOMPILER@
LIBS_FWBUILDER = @LIBFWBUILDER_LIBS_FWBUILDER@
target.path = $$PREFIX/bin
dtd.path = @TEMPLATE_DIR@/
migration.path = @TEMPLATE_DIR@/migration
dtd.path = @RES_DIR@/
migration.path = @RES_DIR@/migration
doc.path = @DOCDIR@
datadir.path = @DATADIR@
@ -56,17 +57,11 @@ unix {
res_configlets.path = $$res.path/configlets
# INSTALLS += icns
LIBS += $$LIBS_FWBUILDER @LIBS@
LIBS += @LIBS@
PKGLOCALEDIR = $$res.path/locale
LIBS += $$LIBS_FWBUILDER @LIBS@
CONFIG += warn_on debug
QMAKE_CFLAGS_DEBUG += -Wno-unused-parameter
QMAKE_CFLAGS_RELEASE += -Wno-unused-parameter
QMAKE_CXXFLAGS_DEBUG += -Wno-unused-parameter
QMAKE_CXXFLAGS_RELEASE += -Wno-unused-parameter
}
}
@ -83,15 +78,4 @@ exists(qmake2.inc) {
include(qmake2.inc)
}
exists(build_num) {
include(build_num)
}
if (isEmpty(BUILD_NUM)) {
GIT_BRANCH=$$system(git branch | grep '\\*' | cut -c3-)
GIT_COMMIT=$$system(git show --abbrev-commit -1 --pretty=oneline --shortstat | head -1 | cut -c1-7)
BUILD_NUM="\"$$GIT_BRANCH:$$GIT_COMMIT\""
}
DEFINES += BUILD_NUM=$$BUILD_NUM
INSTALLS += target

View File

@ -64,10 +64,10 @@ HEADERS = ../../config.h \
macx:LIBS += $$LIBS_FWCOMPILER
INCLUDEPATH += ../compiler_lib
INCLUDEPATH += ../compiler_lib ../libfwbuilder/src
win32:LIBS += ../compiler_lib/release/compilerdriver.lib
!win32:LIBS += ../compiler_lib/libcompilerdriver.a
# win32:LIBS += ../compiler_lib/release/compilerdriver.lib
# !win32:LIBS += ../compiler_lib/libcompilerdriver.a
win32:PRE_TARGETDEPS = ../compiler_lib/release/compilerdriver.lib
!win32:PRE_TARGETDEPS = ../compiler_lib/libcompilerdriver.a

View File

@ -12,6 +12,8 @@ SOURCES = init.cpp
HEADERS = ../../config.h commoninit.h
INCLUDEPATH += ../libfwbuilder/src
CONFIG += staticlib
TARGET = common

View File

@ -59,7 +59,7 @@ void init(char * const*)
/* On Unix RES_DIR and LIBFWBUILDER_TEMPLATE_DIR are absolute paths */
if (respath=="") respath = RES_DIR;
librespath = LIBFWBUILDER_TEMPLATE_DIR;
librespath = RES_DIR;
libfwbuilder::init();

View File

@ -30,7 +30,7 @@ HEADERS = ../../config.h \
pixInterfaces.h \
interfacePropertiesObjectFactory.h
!macx:LIBS += $$LIBS_FWCOMPILER
INCLUDEPATH += ../libfwbuilder/src
CONFIG += staticlib

View File

@ -9,16 +9,26 @@ TEMPLATE = app
SOURCES = fwbedit.cpp new_object.cpp repair_tree.cpp list_object.cpp merge.cpp
HEADERS = ../../config.h fwbedit.h upgradePredicate.h
INCLUDEPATH += ../libfwbuilder/src
TARGET = fwbedit
QMAKE_COPY = ../../install.sh -m 0755 -s
DEPENDPATH = ../common
DEPENDPATH = ../common \
../libfwbuilder/src/fwbuilder \
../libfwbuilder/src/fwcompiler
!win32:LIBS += ../common/libcommon.a
!win32:PRE_TARGETDEPS = ../common/libcommon.a
!win32:LIBS += ../common/libcommon.a \
../libfwbuilder/src/fwbuilder/libfwbuilder.a
!win32:PRE_TARGETDEPS = ../common/libcommon.a \
../libfwbuilder/src/fwbuilder/libfwbuilder.a
win32:CONFIG += console
win32:LIBS += ../common/release/common.lib
win32:PRE_TARGETDEPS = ../common/release/common.lib
win32:LIBS += ../common/release/common.lib \
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib
win32:PRE_TARGETDEPS = ../common/release/common.lib \
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib

View File

@ -4,6 +4,8 @@ include(../../qmake.inc)
#
TEMPLATE = lib
#
INCLUDEPATH += ../libfwbuilder/src
SOURCES = TransferDevice.cpp
HEADERS = TransferDevice.h

View File

@ -11,8 +11,17 @@ SOURCES += main.cpp
# Arrange static libraries before dynamic ones in the linker command
# line. libgui goes first
win32:STATIC_LIBS += ../libgui/release/gui.lib
!win32:STATIC_LIBS += ../libgui/libgui.a
win32 {
FWBPARSER_LIB = ../parsers/release/fwbparser.lib
FWTRANSFER_LIB = ../fwtransfer/release/fwtransfer.lib
STATIC_LIBS += ../libgui/release/gui.lib
}
!win32 {
FWBPARSER_LIB = ../parsers/libfwbparser.a
FWTRANSFER_LIB = ../fwtransfer/libfwtransfer.a
STATIC_LIBS += ../libgui/libgui.a
}
INCLUDEPATH += $$ANTLR_INCLUDEPATH
STATIC_LIBS += $$FWBPARSER_LIB $$ANTLR_LIBS
@ -34,7 +43,8 @@ INCLUDEPATH += \
../pflib \
../cisco_lib/ \
../compiler_lib/ \
../libgui
../libgui \
../libfwbuilder/src
win32:INCLUDEPATH += ../libgui/ui
!win32:INCLUDEPATH += ../libgui/.ui
@ -45,21 +55,27 @@ DEPENDPATH = \
../pflib \
../cisco_lib/ \
../compiler_lib \
../libgui
../libgui \
../libfwbuilder/src/fwbuilder \
../libfwbuilder/src/fwcompiler
win32:STATIC_LIBS += \
../common/release/common.lib \
../iptlib/release/iptlib.lib \
../pflib/release/fwbpf.lib \
../cisco_lib/release/fwbcisco.lib \
../compiler_lib/release/compilerdriver.lib
../compiler_lib/release/compilerdriver.lib \
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
!win32:STATIC_LIBS += \
../common/libcommon.a \
../iptlib/libiptlib.a \
../pflib/libfwbpf.a \
../cisco_lib/libfwbcisco.a \
../compiler_lib/libcompilerdriver.a
../compiler_lib/libcompilerdriver.a \
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
../libfwbuilder/src/fwbuilder/libfwbuilder.a \
win32:PRE_TARGETDEPS = \
../libgui/release/gui.lib \
@ -68,7 +84,10 @@ win32:PRE_TARGETDEPS = \
../pflib/release/fwbpf.lib \
../cisco_lib/release/fwbcisco.lib \
../compiler_lib/release/compilerdriver.lib \
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib \
$$FWBPARSER_LIB
!win32:PRE_TARGETDEPS = \
../libgui/libgui.a \
../common/libcommon.a \
@ -76,6 +95,8 @@ win32:PRE_TARGETDEPS = \
../pflib/libfwbpf.a \
../cisco_lib/libfwbcisco.a \
../compiler_lib/libcompilerdriver.a \
../libfwbuilder/src/fwbuilder/libfwbuilder.a \
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
$$FWBPARSER_LIB
macx:STATIC_LIBS += -framework \

View File

@ -18,16 +18,32 @@ HEADERS = ../../config.h
win32:CONFIG += console
INCLUDEPATH += ../common ../cisco_lib/ ../compiler_lib
INCLUDEPATH += ../common ../cisco_lib/ ../compiler_lib ../libfwbuilder/src
win32:LIBS += ../common/release/common.lib ../cisco_lib/release/fwbcisco.lib ../compiler_lib/release/compilerdriver.lib
!win32:LIBS += ../common/libcommon.a ../cisco_lib/libfwbcisco.a ../compiler_lib/libcompilerdriver.a
win32:LIBS += ../common/release/common.lib \
../cisco_lib/release/fwbcisco.lib \
../compiler_lib/release/compilerdriver.lib \
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
win32:PRE_TARGETDEPS = ../common/release/common.lib ../cisco_lib/release/fwbcisco.lib ../compiler_lib/release/compilerdriver.lib
!win32:PRE_TARGETDEPS = ../common/libcommon.a ../cisco_lib/libfwbcisco.a ../compiler_lib/libcompilerdriver.a
!win32:LIBS += ../common/libcommon.a \
../cisco_lib/libfwbcisco.a \
../compiler_lib/libcompilerdriver.a \
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
../libfwbuilder/src/fwbuilder/libfwbuilder.a
win32:PRE_TARGETDEPS = ../common/release/common.lib \
../cisco_lib/release/fwbcisco.lib \
../compiler_lib/release/compilerdriver.lib \
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
!win32:PRE_TARGETDEPS = ../common/libcommon.a \
../cisco_lib/libfwbcisco.a \
../compiler_lib/libcompilerdriver.a \
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
../libfwbuilder/src/fwbuilder/libfwbuilder.a
LIBS += $$LIBS_FWCOMPILER
TARGET = fwb_iosacl
TARGET = fwb_iosacl

View File

@ -14,15 +14,32 @@ win32:CONFIG += console
# unix { !macx: CONFIG -= qt }
INCLUDEPATH += ../common ../pflib ../compiler_lib
INCLUDEPATH += ../common ../pflib ../compiler_lib ../libfwbuilder/src
DEPENDPATH = ../pflib
win32:LIBS += ../common/release/common.lib ../pflib/release/fwbpf.lib ../compiler_lib/release/compilerdriver.lib
!win32:LIBS += ../common/libcommon.a ../pflib/libfwbpf.a ../compiler_lib/libcompilerdriver.a
win32:LIBS += ../common/release/common.lib \
../pflib/release/fwbpf.lib \
../compiler_lib/release/compilerdriver.lib \
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
win32:PRE_TARGETDEPS = ../common/release/common.lib ../pflib/release/fwbpf.lib ../compiler_lib/release/compilerdriver.lib
!win32:PRE_TARGETDEPS = ../common/libcommon.a ../pflib/libfwbpf.a ../compiler_lib/libcompilerdriver.a
!win32:LIBS += ../common/libcommon.a \
../pflib/libfwbpf.a \
../compiler_lib/libcompilerdriver.a \
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
../libfwbuilder/src/fwbuilder/libfwbuilder.a
LIBS += $$LIBS_FWCOMPILER
win32:PRE_TARGETDEPS = ../common/release/common.lib \
../pflib/release/fwbpf.lib \
../compiler_lib/release/compilerdriver.lib \
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
TARGET = fwb_ipf
!win32:PRE_TARGETDEPS = ../common/libcommon.a \
../pflib/libfwbpf.a \
../compiler_lib/libcompilerdriver.a \
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
../libfwbuilder/src/fwbuilder/libfwbuilder.a
TARGET = fwb_ipf

View File

@ -12,16 +12,33 @@ HEADERS = ../../config.h
win32:CONFIG += console
INCLUDEPATH += ../common ../pflib ../compiler_lib
INCLUDEPATH += ../common ../pflib ../compiler_lib ../libfwbuilder/src
DEPENDPATH = ../pflib
win32:LIBS += ../common/release/common.lib ../pflib/release/fwbpf.lib ../compiler_lib/release/compilerdriver.lib
!win32:LIBS += ../common/libcommon.a ../pflib/libfwbpf.a ../compiler_lib/libcompilerdriver.a
win32:LIBS += ../common/release/common.lib \
../pflib/release/fwbpf.lib \
../compiler_lib/release/compilerdriver.lib \
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
win32:PRE_TARGETDEPS = ../common/release/common.lib ../pflib/release/fwbpf.lib ../compiler_lib/release/compilerdriver.lib
!win32:PRE_TARGETDEPS = ../common/libcommon.a ../pflib/libfwbpf.a ../compiler_lib/libcompilerdriver.a
!win32:LIBS += ../common/libcommon.a \
../pflib/libfwbpf.a \
../compiler_lib/libcompilerdriver.a \
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
../libfwbuilder/src/fwbuilder/libfwbuilder.a
win32:PRE_TARGETDEPS = ../common/release/common.lib \
../pflib/release/fwbpf.lib \
../compiler_lib/release/compilerdriver.lib \
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
!win32:PRE_TARGETDEPS = ../common/libcommon.a \
../pflib/libfwbpf.a \
../compiler_lib/libcompilerdriver.a \
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
../libfwbuilder/src/fwbuilder/libfwbuilder.a
LIBS += $$LIBS_FWCOMPILER
TARGET = fwb_ipfw
TARGET = fwb_ipfw

View File

@ -12,16 +12,33 @@ HEADERS = ../../config.h
win32: CONFIG += console
INCLUDEPATH += ../common ../iptlib ../compiler_lib/
INCLUDEPATH += ../common ../iptlib ../compiler_lib/ ../libfwbuilder/src
DEPENDPATH = ../common ../iptlib ../compiler_lib
win32:LIBS += ../common/release/common.lib ../iptlib/release/iptlib.lib ../compiler_lib/release/compilerdriver.lib
!win32:LIBS += ../common/libcommon.a ../iptlib/libiptlib.a ../compiler_lib/libcompilerdriver.a
win32:LIBS += ../common/release/common.lib \
../iptlib/release/iptlib.lib \
../compiler_lib/release/compilerdriver.lib \
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
win32:PRE_TARGETDEPS = ../common/release/common.lib ../iptlib/release/iptlib.lib ../compiler_lib/release/compilerdriver.lib
!win32:PRE_TARGETDEPS = ../common/libcommon.a ../iptlib/libiptlib.a ../compiler_lib/libcompilerdriver.a
!win32:LIBS += ../common/libcommon.a \
../iptlib/libiptlib.a \
../compiler_lib/libcompilerdriver.a \
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
../libfwbuilder/src/fwbuilder/libfwbuilder.a
LIBS += $$LIBS_FWCOMPILER
win32:PRE_TARGETDEPS = ../common/release/common.lib \
../iptlib/release/iptlib.lib \
../compiler_lib/release/compilerdriver.lib \
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
!win32:PRE_TARGETDEPS = ../common/libcommon.a \
../iptlib/libiptlib.a \
../compiler_lib/libcompilerdriver.a \
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
../libfwbuilder/src/fwbuilder/libfwbuilder.a
TARGET = fwb_ipt

View File

@ -44,16 +44,17 @@ HEADERS = ../../config.h \
CONFIG += staticlib
INCLUDEPATH += ../compiler_lib/
INCLUDEPATH += ../compiler_lib/ ../libfwbuilder/src
DEPENDPATH = ../compiler_lib
win32:LIBS += ../compiler_lib/release/compilerdriver.lib
!win32:LIBS += ../compiler_lib/libcompilerdriver.a
win32:PRE_TARGETDEPS = ../compiler_lib/release/compilerdriver.lib \
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib \
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib
win32:PRE_TARGETDEPS = ../compiler_lib/release/compilerdriver.lib
!win32:PRE_TARGETDEPS = ../compiler_lib/libcompilerdriver.a
LIBS += $$LIBS_FWCOMPILER
!win32:PRE_TARGETDEPS = ../compiler_lib/libcompilerdriver.a \
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
../libfwbuilder/src/fwbuilder/libfwbuilder.a
TARGET = iptlib

View File

@ -1,12 +0,0 @@
aclocal.m4
autom4te.cache
config.guess
config.log
config.status
config.sub
configure
libfwbuilder-config
libfwbuilder.spec
libtool
ltmain.sh
Makefile

View File

@ -1,18 +0,0 @@
*.so*
*.log
*.status
*.guess
*.sub
*.cache
*.m4
Makefile
install*
qmake.inc
ltmain.sh
configure
.obj
libfwbuilder-config-4
libfwbuilder-config.h
src/fwbuilder/unit_tests/*/*Test
.configure_marker
.build_marker

View File

@ -1,11 +0,0 @@
Vadim Kurland <vadim@vk.crocodile.org.> Main author
Vadim Zaliva <lord@crocodile.org> XML DTD design;
XML data storage implementation;
implementation of printing

View File

@ -1,340 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

File diff suppressed because it is too large Load Diff

View File

@ -1,72 +0,0 @@
$Id: Credits 378 2002-09-09 04:29:46Z vkurland $
We wold like to thank the following people who helped us in various
ways to make this project happen:
Special thanks to Friedhelm Düsterhöft <fd@msdd.net> for help with XML
development on early stages of the project and initial implementation
of XSLT filters.
Special thanks to Marc Pfefferkorn <marc.pfefferkorn@post.rwth-aachen.de>
for help in debugging on SuSE, building packages for SuSE and help in
managing support requests.
Special thanks to Jeremy T. Bouse <Jeremy.Bouse@UnderGrid.net> for
mantaining fwbuilder packages on Debian, help in managing support
requests and for ideas and contributions.
For icons : Hector Rivera Falu <misha@phreaker.net>
For art and a web site: Tanya Soussokolova <ts@vk.crocodile.org>
For accounts given to us so we could compile and debug fwbuilder on
different platforms: Vlad Karpinsky <vlad@crocodile.org>,
Vadim Getmanschuk <vaget@vaget.org>
For ideas, suggestions, patches:
Friedhelm Düsterhöft" <friedhelm.duesterhoeft@msdd.net>
- many suggestions and prototype for DTD.
Carlo Wood <carlo@alinoe.com>
- many valuable patches and bug reports
- suggestions regarding rpm building process and changes to spec file
Jochen Friedrich <jochen+fwbuilder-dev@scram.de>
- ideas for future development
Vadim Fedukovich <vf@unity.net>
- help with OpenSSL and answering related questins.
For contributions:
David Gullasch <gullasch@secunet.de>
- firewall policy installation script
Igor Morozov <igor@grad.kiev.ua>
- Win32 porting
Andrew Hood <mithrandir@alwaysonline.net.au>
- suggestion and a patch for proper use of libsnmp
For beta-testng:
Eric S. Johansson <esj@harvee.billerica.ma.us>
Friedhelm Düsterhöft" <friedhelm.duesterhoeft@msdd.net>
Joerg Fritsch <joerg.fritsch@planet-interkom.de>
karsten reincke <reincke@icdm.de>
Rob Wallace <rwallace@videotron.ca>
Vidal Augusto Zapparoli Castro Melo <vaugusto@lsi.usp.br>
tobias.manthey@progredy.de

View File

@ -1,23 +0,0 @@
Firewall Builder Routing add-on
Copyright (C) 2004 Compal GmbH, Germany
Author: Tidei Maurizio <fwbuilder-routing at compal.de>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,113 +0,0 @@
Prerequisites
=============
You need the following packages installed on your system:
* gcc-c++
* libstdc++-devel
* libxml2 and libxml2-devel v2.4.10 or newer
* libxslt and libxslt-devel v1.0.7 o newer
* net-snmp and net-snmp-devel
* openssl and openssl-devel - always use latest version
* QT 3.1.x, 3.2.x, 3.3.x , including qt-devel package
QT must be compiled with thread support
You may need to install packages elfutils-libelf and
elfutils-libelf-devel (libelf on SuSE) if libfwbuilder doesn't pick up
net-snmp library even if it is installed
If you get errors that refer to missing autoconf macros while running
autogen.sh for fwbuilder, check if your system has RPM ac-archive if
you run RedHat 9.0, Fedora Core1/2, Mandrake or SuSE and gettext-devel
if you are on Fedora Core 3 and later. You may need to add other
"development" RPMs besides these, but I have found these two are often
forgotten.
Basic Installation
==================
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./autogen.sh' to configure the package for your system. Script
autogen.sh calls more commonly known autodetect script
`configure'. All command line options given to `autogen.sh' will be
passed further to `configure'.
Running `autogen.sh' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Type `make install' to install the programs and any data files and
documentation. You may need to be root at this point to be able
to install into system-wide directory like "/usr" or
"/usr/local". Directory where binaries and documentation is
installed depends on the command-line parameter "--prefix" given
to autogen.sh ( and subsequently to `configure' ).
4. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `autogen.sh' created (so you can compile the package for
a different kind of computer), type `make distclean'.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `autogen.sh' the
option `--prefix=PATH'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System).
`configure' recognizes the following options to control how it
operates.
`--with-templatedir=DIR'
Specify directory path for fwbuilder template files
`--with-docdir=DIR'
Specify directory path for libfwbuilder documentation files
`--with-lwres'
use lightweight resolver library (needs bind 9) (default is NO)
`--with-openssl-prefix=PFX'
Prefix where openssl is installed (optional)
`--with-stlport'
use STLport library (default is NO)
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `autogen.sh'.
`--help'
Print a summary of the options to `autogen.sh', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--version'
Print the version of Autoconf used to generate the `autogen.sh'
script, and exit.
`configure' also accepts some other, not widely useful, options.

View File

@ -1,100 +0,0 @@
Title : Firewall Builder Compiler Manifest File
Author : Vadim Zaliva <lord@crocodile.org>
Revision: 1.1
Status : Proposal
==================================================
Rationale
---------
Firewall builder allows users to develop their own policy compilers
and installation scripts. Compilers and installation scripts are
developed by different people. Same policy compiler might have many
installation scripts and same installation script might be used with
different policy compilers.
Manifest file provides a way for install script to tell what files are
produced by policy compiler.
Also, this manifest file will be used to transmit files to remote
machine and to install them there using remote install script.
Requirements
-------------
All policy compilers compatible with FirewallBuilder must support '-m'
option followed by file name. Upon successful policy compiler
execution this file must contain "manifest" data in format described
in this document. If file happen to exist, it must be overwritten.
All policy compilers compatible with FirewallBuilder must support '-m'
option followed by file name. This file will contain infromation
produced by compiler in "manifest" format.
Format
-------
File is ASCII text with character 0x0A used as line delimiter. Each
line consists of following fields delimited by spaces:
0. Action
1. Filename
2. Action-specific parameters
Action tells compiler how file could be installed. There is no strict
list actions. Policy compiler and install script developers could add
new actions, as long as it supported by compiler and install script
both.
File name is name of the file generated by compiler. It could be
configuration file, shell script, etc.
Action arguments contain information passed to action. Their format is
not specified, except the fact that it can contain macros, in shell
like format. Install script will resolve these macros to values
prior to processing action.
Example of manifest file:
SH policy.fw 0
COPY hosts ${ETC}/hosts 255 ${ETC}/hosts.bak
Actions
-------
Here are some basic actions:
1. COPY
Parameters: destination, permissions, backup_file_name
2. RUN
Parameters: uid
3. RUN_CHROOT
Parameters: uid, root
Macros:
-------
Here are few basic macros:
1. ETC - location of system /etc directory
2. TMP - location of system temporary directory
3. FQHN - host name with domain
Implementation:
---------------
Each action is implemented as shell script or executable command
localted in special directory. Only commands located in this directory
are executed. User can write new commands and add them to the
directory.
It is responsibility of each command to enfores security
restrictions. For example implementation of COPY command might have
configuration file which specify what files and directories it is
allowed to write to and what files permissions should be.

View File

@ -1,36 +0,0 @@
$Id: PatchAcceptancePolicy.txt 87 2001-12-29 21:01:25Z vkurland $
Firewall Buider Project welcomes user contributions. Because we would
like not to be limited in future licensing options of the code,
authors of all submitted patches must agree that their contribution is
donated to our project under terms of following license (this is MIT
license):
-------------------------------------------------------------------------
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-------------------------------------------------------------------------
When submitting the patch please state that you agree with this
license.

View File

@ -1,5 +0,0 @@
this is Firewall Builder API README file

View File

@ -1,26 +0,0 @@
#-*- mode: makefile; tab-width: 4; -*-
#
include(../qmake.inc)
TEMPLATE = lib
CONFIG -= embed_manifest_exe
QMAKE_RUN_CC = echo
QMAKE_RUN_CXX = echo
QMAKE_LINK = echo
TARGET =
target.files = AUTHORS \
ChangeLog \
COPYING \
Credits \
INSTALL \
PatchAcceptancePolicy.txt
target.path = $$doc.path
#INSTALLS -= target
#INSTALLS += doc

View File

@ -1,250 +0,0 @@
#! /bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0

View File

@ -3,7 +3,7 @@
TEMPLATE = subdirs
SUBDIRS = etc doc migration src
SUBDIRS = etc migration src
DOLLAR = $

View File

@ -1,88 +0,0 @@
#!/bin/sh
if [ -x /bin/bash ]; then BASH="/bin/bash"; fi
if [ -x /usr/bin/bash ]; then BASH="/usr/bin/bash"; fi
if [ -x /usr/local/bin/bash ]; then BASH="/usr/local/bin/bash"; fi
if [ -z "$BASH" ]; then
echo "Could not find bash."
exit 1
fi
PACKAGE_NAME="libfwbuilder"
VERSION=`./printversion.sh`
RPMROOT=/var/tmp/${PACKAGE_NAME}
EXPORTDIR=`pwd`/export
TAR_FILE=${PACKAGE_NAME}-${VERSION}.tar.gz
SNAPSHOT_DIR=${PACKAGE_NAME}-${VERSION}
TMP_FILE=${EXPORTDIR}/.maketar.tmp.sh
SPECFILE=`ls *.spec 2>/dev/null`
#cat > ${TMP_FILE} << EOF
function die {
echo $1
exit 1
}
if test -z ${PACKAGE_NAME} -o -z ${VERSION}; then
echo Usage: maketar.sh package_name version
exit 1
fi
mkdir -p ${EXPORTDIR}
# make distclean
RPMFILES="acconfig.h \
acinclude.m4 \
acsite.m4 \
autogen.sh \
configure \
configure.in \
config.sub \
config.guess \
install.sh \
libfwbuilder.pro \
maketar.sh \
missing \
mkinstalldirs \
printversion.sh \
qmake.inc \
qmake.inc.in \
runqmake.sh \
VERSION \
doc \
etc \
migration/*.pro \
migration/*_[.0-9]*.xslt \
src/*.pro \
src/*/*.in \
src/*/*.pro \
src/*/*.cpp \
src/*/*.h"
RPMFILES="${RPMFILES} ${SPECFILE}"
cd ${EXPORTDIR}
rm -rf ${SNAPSHOT_DIR}
ln -s .. ${SNAPSHOT_DIR}
FILELIST=`for f in ${RPMFILES}; do echo ${SNAPSHOT_DIR}/$f; done`
tar -ch --exclude CVS --exclude *.bak -f - ${FILELIST} | gzip > ${TAR_FILE}
cd ..
#EOF
#
#$BASH $TMP_FILE
#rm -f $TMP_FILE

View File

@ -1,283 +0,0 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing 0.3 - GNU automake"
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
aclocal)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;
tar)
shift
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar ${1+"$@"} && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar ${1+"$@"} && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" ${1+"$@"} && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" ${1+"$@"} && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequirements for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0

View File

@ -1,40 +0,0 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
# $Id: mkinstalldirs 2 2001-09-18 02:44:08Z lord $
errstatus=0
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# mkinstalldirs ends here

View File

@ -1,3 +0,0 @@
. VERSION
echo $LIBFWBUILDER_VERSION

View File

@ -19,8 +19,7 @@ unix {
QMAKE_CXX = @CCACHE@ @DISTCC@ $$QMAKE_CXX
INCLUDEPATH += /usr/include @XML_CFLAGS_Q@ @XSLT_CFLAGS_Q@ @PTHREAD_CFLAGS_Q@
LIBS += @PTHREAD_LIBS@ @XML_LIBS@ @XSLT_LIBS@ @LIBSNMP_LIBS@ \
@LIB_RESOLV@ @LIBS@
LIBS += @PTHREAD_LIBS@ @XML_LIBS@ @XSLT_LIBS@ @LIBSNMP_LIBS@ @LIB_RESOLV@ @LIBS@
!macx {
UI_DIR = .ui
@ -31,8 +30,8 @@ unix {
DESTDIR =
target.path = @LIBDIR@
dtd.path = @TEMPLATE_DIR@/
migration.path = @TEMPLATE_DIR@/migration
dtd.path = @RES_DIR@/
migration.path = @RES_DIR@/migration
doc.path = @DOCDIR@
CONFIG += warn_on debug

View File

@ -1,23 +0,0 @@
#-*- mode: makefile; tab-width: 4; -*-
#
include(../../qmake.inc)
#
# TEMPLATE = app
win32 {
CONFIG -= embed_manifest_exe
}
QMAKE_RUN_CC = @echo
QMAKE_RUN_CXX = @echo
QMAKE_LINK = @echo
QMAKE_LIB = @echo
TARGET = confscript
script.files = libfwbuilder-config-4
script.path = "$$prefix/bin"
INSTALLS -= target
INSTALLS += script

View File

@ -1,226 +0,0 @@
#!/bin/sh
prefix="@prefix@"
exec_prefix="@exec_prefix@"
libdir="@libdir@"
TEMPLATE_DIR="@TEMPLATE_DIR@"
# libfwbuilder neeeds pthread, xml2, xslt
PTHREAD_CFLAGS="@PTHREAD_CFLAGS@"
PTHREAD_LIBS="@PTHREAD_LIBS@"
RANLIB="@RANLIB@"
VERSION="@LIBFWBUILDER_VERSION@"
XML_VERSION="@FWBUILDER_XML_VERSION@"
XML_CFLAGS="@XML_CFLAGS@"
XML_LIBS="@XML_LIBS@"
XSLT_CFLAGS="@XSLT_CFLAGS@"
XSLT_LIBS="@XSLT_LIBS@"
LIBSNMP_LIBS="@LIBSNMP_LIBS@"
LIB_RESOLV="@LIB_RESOLV@"
LIBS="@LIBS@"
CPPFLAGS="@CPPFLAGS@"
usage()
{
cat <<EOF
Usage: libfwbuilder-config [OPTION] [LIBRARIES]
Options:
--libs print library linking information
--staticlibs print static linking information
--includepath print path to additional include directories without "-I"
--cflags print pre-processor and compiler flags
--templatedir print the path to template directory
--libpath print the path to the library directory
--help display this help and exit
--version output version information
--xml_version output data format version information
Libraries:
fwbuilder
fwcompiler
EOF
exit $1
}
if test $# -eq 0; then
usage 1
fi
cflags=false
includepath=false
libs=false
static=false
LIBFWBUILDER_LIBDIR="@LIBFWBUILDER_LIBDIR@"
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case "$1" in
--prefix)
echo $prefix
;;
--templatedir)
echo ${TEMPLATE_DIR}
;;
--libpath)
echo ${libdir}
;;
--version)
echo ${VERSION}
exit 0
;;
--xml_version)
echo ${XML_VERSION}
exit 0
;;
--help)
usage 0
;;
--cflags)
cflags=true
;;
--includepath)
includepath=true
;;
--libs)
libs=true
;;
--staticlibs)
libs=true
static=true
;;
fwbuilder)
lib_fwbuilder=yes
;;
fwcompiler)
lib_fwcompiler=yes
;;
*)
usage
exit 1
;;
esac
shift
done
TP=`echo $prefix | sed 's/\///g'`
if test "$TP" != "usr" ; then
includedir="-I${prefix}/include/"
fi
includedir="${includedir} -I${prefix}/include/fwb-4"
the_libs="$the_libs ${LIBFWBUILDER_LIBDIR} ${LIBS} ${PTHREAD_LIBS} ${XSLT_LIBS} ${XML_LIBS} ${LIBSNMP_LIBS} ${LIB_RESOLV}"
the_flags="$the_flags ${includedir} ${CPPFLAGS} ${PTHREAD_CFLAGS} ${XML_CFLAGS} ${XSLT_CFLAGS} "
if $cflags; then
all_flags="$the_flags"
fi
if $includepath; then
set -- $the_flags
while test -n "$1"; do
if echo "$1" | grep -E -- "^-I" >/dev/null 2>&1; then
I=`echo "$1" | sed 's/-I//'`
INCLUDEPATH="$INCLUDEPATH $I"
fi
shift
done
all_flags="$INCLUDEPATH"
fi
if $libs; then
all_flags="$all_flags $the_libs"
fi
if test -z "$all_flags" || test "x$all_flags" = "x "; then
exit 1
fi
# Straight out any possible duplicates, but be careful to
# get `-lfoo -lbar -lbaz' for `-lfoo -lbaz -lbar -lbaz'
other_flags=
rev_libs=
stat_lib=
for i in $all_flags; do
case "$i" in
-L/usr/lib) ;;
-I/usr/include) ;;
*.a) stat_libs="$stat_libs $i" ;;
-l*) rev_libs="$i $rev_libs" ;;
*)
case " $other_flags " in
*\ $i\ *) ;; # already there
*) other_flags="$other_flags $i" ;; # add it to output
esac ;;
esac
done
ord_libs=
for i in $rev_libs; do
case " $ord_libs " in
*\ $i\ *) ;; # already there
*) ord_libs="$i $ord_libs" ;; # add it to output in reverse order
esac
done
if $libs; then
if $static; then
fwb_libs="$libdir/libfwbuilder.a"
if test "$lib_fwcompiler" = "yes"; then
fwb_libs="$libdir/libfwcompiler.a ${fwb_libs}"
fi
ord_libs="${fwb_libs} $ord_libs"
else
fwb_libs="-lfwbuilder"
if test "$lib_fwcompiler" = "yes"; then
fwb_libs="-lfwcompiler ${fwb_libs}"
fi
ord_libs="${fwb_libs} $ord_libs"
fi
fi
echo $other_flags $ord_libs $stat_libs
exit 0

View File

@ -47,5 +47,5 @@ const string Constants::getDataFormatVersion()
const string Constants::getTemplateDirectory()
{
return string(LIBFWBUILDER_TEMPLATE_DIR);
return string(RES_DIR);
}

View File

@ -2,6 +2,9 @@
#
include(../../qmake.inc)
#
TEMPLATE = lib
CONFIG += staticlib
VERSION = $$SO_VERSION
#
SOURCES = InetAddr.cpp \
@ -151,10 +154,12 @@ HEADERS = inet_net.h \
ObjectMirror.h \
XMLTools.h
headers.files = $$HEADERS
headers.path = "$$prefix/include/fwb-4/fwbuilder"
TARGET = fwbuilder
# target.path = "$$prefix/lib"
INSTALLS += headers
# no need to install headers
#headers.files = $$HEADERS
#headers.path = "$$prefix/include/fwb-4/fwbuilder"
#INSTALLS += headers
# and no need to install .a library
INSTALLS -= target

View File

@ -10,7 +10,7 @@
* Template files directory dir
* DO NOT USE THIS CONSTANT DIRECTLY - USE Constants class instead!
*/
#undef LIBFWBUILDER_TEMPLATE_DIR
#undef RES_DIR
#undef HAVE_LIBSNMP
#undef UCD_SNMP

View File

@ -1,2 +1,2 @@
#define LIBFWBUILDER_VERSION "4.1.4"
#define LIBFWBUILDER_VERSION ""
#define LIBFWBUILDER_FORMAT_VERSION "17"

View File

@ -2,6 +2,9 @@
#
include(../../qmake.inc)
#
TEMPLATE = lib
CONFIG += staticlib
VERSION = $$SO_VERSION
#
SOURCES = BaseCompiler.cpp \
@ -24,14 +27,17 @@ HEADERS = BaseCompiler.h \
RuleProcessor.h \
RoutingCompiler.h
headers.files = $$HEADERS
headers.path = "$$prefix/include/fwb-4/fwcompiler"
unix {
LIBS += -L../fwbuilder -lfwbuilder
}
TARGET = fwcompiler
TARGET = fwcompiler
# target.path = "$$prefix/lib"
INSTALLS += headers
# no need to install headers in fortress
#headers.files = $$HEADERS
#headers.path = "$$prefix/include/fwb-4/fwcompiler"
#INSTALLS += headers
# and no need to install .a library
INSTALLS -= target

View File

@ -5,6 +5,6 @@ TEMPLATE = subdirs
CONFIG += ordered
TARGET = src
SUBDIRS = confscript fwbuilder fwcompiler
SUBDIRS = fwbuilder fwcompiler

View File

@ -1,12 +1,9 @@
# -*- mode: makefile; tab-width: 4; -*-
# $Id$
#TEMPLATE = lib
#CONFIG += staticlib
#LANGUAGE = C++
QT += network
#TARGET = libgui
#INSTALLS -= target
include(../../qmake.inc)
exists(qmake.inc):include( qmake.inc)
TEMPLATE = lib
@ -495,11 +492,16 @@ INCLUDEPATH += ../common \
../iptlib \
../pflib \
../cisco_lib/ \
../compiler_lib/
../compiler_lib/ \
../libfwbuilder/src
DEPENDPATH = ../common \
../iptlib \
../pflib \
../cisco_lib/ \
../compiler_lib
../compiler_lib \
../libfwbuilder/src/fwbuilder \
../libfwbuilder/src/fwcompiler
RESOURCES += MainRes.qrc

View File

@ -20,7 +20,8 @@ HEADERS = ../../config.h \
CONFIG += staticlib
INCLUDEPATH += $$ANTLR_INCLUDEPATH
INCLUDEPATH += $$ANTLR_INCLUDEPATH ../libfwbuilder/src/
LIBS += $$ANTLR_LIBS
DEFINES += $$ANTLR_DEFINES

View File

@ -12,16 +12,33 @@ HEADERS = ../../config.h
win32:CONFIG += console
INCLUDEPATH += ../common ../pflib ../compiler_lib
INCLUDEPATH += ../common ../pflib ../compiler_lib ../libfwbuilder/src/
DEPENDPATH = ../pflib
win32:LIBS += ../common/release/common.lib ../pflib/release/fwbpf.lib ../compiler_lib/release/compilerdriver.lib
!win32:LIBS += ../common/libcommon.a ../pflib/libfwbpf.a ../compiler_lib/libcompilerdriver.a
win32:LIBS += ../common/release/common.lib \
../pflib/release/fwbpf.lib \
../compiler_lib/release/compilerdriver.lib \
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
win32:PRE_TARGETDEPS = ../common/release/common.lib ../pflib/release/fwbpf.lib ../compiler_lib/release/compilerdriver.lib
!win32:PRE_TARGETDEPS = ../common/libcommon.a ../pflib/libfwbpf.a ../compiler_lib/libcompilerdriver.a
!win32:LIBS += ../common/libcommon.a \
../pflib/libfwbpf.a \
../compiler_lib/libcompilerdriver.a \
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
../libfwbuilder/src/fwbuilder/libfwbuilder.a
win32:PRE_TARGETDEPS = ../common/release/common.lib \
../pflib/release/fwbpf.lib \
../compiler_lib/release/compilerdriver.lib \
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
!win32:PRE_TARGETDEPS = ../common/libcommon.a \
../pflib/libfwbpf.a \
../compiler_lib/libcompilerdriver.a \
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
../libfwbuilder/src/fwbuilder/libfwbuilder.a
LIBS += $$LIBS_FWCOMPILER
TARGET = fwb_pf
TARGET = fwb_pf

View File

@ -54,16 +54,14 @@ HEADERS = ../../config.h \
macx:LIBS += $$LIBS_FWCOMPILER
INCLUDEPATH += ../compiler_lib
win32:LIBS += ../compiler_lib/release/compilerdriver.lib
!win32:LIBS += ../compiler_lib/libcompilerdriver.a
INCLUDEPATH += ../compiler_lib ../libfwbuilder/src
win32:PRE_TARGETDEPS = ../compiler_lib/release/compilerdriver.lib
!win32:PRE_TARGETDEPS = ../compiler_lib/libcompilerdriver.a
CONFIG += staticlib
TARGET = fwbpf
TARGET = fwbpf
INSTALLS -= target

View File

@ -12,15 +12,31 @@ HEADERS = ../../config.h
win32:CONFIG += console
INCLUDEPATH += ../common ../cisco_lib/ ../compiler_lib
INCLUDEPATH += ../common ../cisco_lib/ ../compiler_lib ../libfwbuilder/src/
win32:LIBS += ../common/release/common.lib ../cisco_lib/release/fwbcisco.lib ../compiler_lib/release/compilerdriver.lib
!win32:LIBS += ../common/libcommon.a ../cisco_lib/libfwbcisco.a ../compiler_lib/libcompilerdriver.a
win32:LIBS += ../common/release/common.lib \
../cisco_lib/release/fwbcisco.lib\
../compiler_lib/release/compilerdriver.lib \
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
win32:PRE_TARGETDEPS = ../common/release/common.lib ../cisco_lib/release/fwbcisco.lib ../compiler_lib/release/compilerdriver.lib
!win32:PRE_TARGETDEPS = ../common/libcommon.a ../cisco_lib/libfwbcisco.a ../compiler_lib/libcompilerdriver.a
!win32:LIBS += ../common/libcommon.a \
../cisco_lib/libfwbcisco.a \
../compiler_lib/libcompilerdriver.a \
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
../libfwbuilder/src/fwbuilder/libfwbuilder.a
LIBS += $$LIBS_FWCOMPILER
win32:PRE_TARGETDEPS = ../common/release/common.lib \
../cisco_lib/release/fwbcisco.lib \
../compiler_lib/release/compilerdriver.lib \
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
!win32:PRE_TARGETDEPS = ../common/libcommon.a \
../cisco_lib/libfwbcisco.a \
../compiler_lib/libcompilerdriver.a \
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
../libfwbuilder/src/fwbuilder/libfwbuilder.a
TARGET = fwb_pix

View File

@ -18,16 +18,32 @@ HEADERS = ../../config.h
win32:CONFIG += console
INCLUDEPATH += ../common ../cisco_lib/ ../compiler_lib
INCLUDEPATH += ../common ../cisco_lib/ ../compiler_lib ../libfwbuilder/src/
win32:LIBS += ../common/release/common.lib ../cisco_lib/release/fwbcisco.lib ../compiler_lib/release/compilerdriver.lib
!win32:LIBS += ../common/libcommon.a ../cisco_lib/libfwbcisco.a ../compiler_lib/libcompilerdriver.a
win32:LIBS += ../common/release/common.lib \
../cisco_lib/release/fwbcisco.lib \
../compiler_lib/release/compilerdriver.lib \
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
win32:PRE_TARGETDEPS = ../common/release/common.lib ../cisco_lib/release/fwbcisco.lib ../compiler_lib/release/compilerdriver.lib
!win32:PRE_TARGETDEPS = ../common/libcommon.a ../cisco_lib/libfwbcisco.a ../compiler_lib/libcompilerdriver.a
!win32:LIBS += ../common/libcommon.a \
../cisco_lib/libfwbcisco.a \
../compiler_lib/libcompilerdriver.a \
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
../libfwbuilder/src/fwbuilder/libfwbuilder.a
win32:PRE_TARGETDEPS = ../common/release/common.lib \
../cisco_lib/release/fwbcisco.lib \
../compiler_lib/release/compilerdriver.lib \
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
!win32:PRE_TARGETDEPS = ../common/libcommon.a \
../cisco_lib/libfwbcisco.a \
../compiler_lib/libcompilerdriver.a \
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
../libfwbuilder/src/fwbuilder/libfwbuilder.a
LIBS += $$LIBS_FWCOMPILER
TARGET = fwb_procurve_acl
TARGET = fwb_procurve_acl

View File

@ -9,7 +9,8 @@ CONFIG += ordered
TARGET = src
SUBDIRS = res \
SUBDIRS = libfwbuilder \
res \
parsers \
antlr \
common \

View File

@ -7,6 +7,8 @@ SOURCES = transfer_secuwall.cpp
HEADERS = ../../../config.h
INCLUDEPATH += ../../libfwbuilder/src
contains( HAVE_QTDBUS, 1 ):unix {
!macx: QT += network dbus
macx: LIBS += -framework QtDBus
@ -15,10 +17,17 @@ contains( HAVE_QTDBUS, 1 ):unix {
!win32 {
QMAKE_COPY = ../../../install.sh -m 0755 -s
LIBS += ../../fwtransfer/libfwtransfer.a \ # -lQtDBus
../../libfwbuilder/src/fwcompiler/libfwcompiler.a \
../../libfwbuilder/src/fwbuilder/libfwbuilder.a
}
win32:CONFIG += console
win32 {
CONFIG += console
LIBS += ../../fwtransfer/release/fwtransfer.lib \ # -lQtDBus
../../libfwbuilder/src/fwcompiler/release/fwcompiler.lib \
../../libfwbuilder/src/fwbuilder/release/fwbuilder.lib
}
TARGET = transfer_secuwall
LIBS += ../$$FWTRANSFER_LIB # -lQtDBus

View File

@ -51,7 +51,7 @@ pass "initTestCase"
# -------- actual testing goes here --------
run_command "runPrinting" "../../../gui/fwbuilder -f test.fwb -P test"
run_command "runPrinting" "../../gui/fwbuilder -f test.fwb -P test"
run_command "fileExists" "ls print.pdf"
# --------- end of actual testing ---------