---
name: firebird-server
version: 2.0.7
origin: databases/firebird20-server
comment: Firebird-2 relational database (server)
arch: freebsd:9:x86:64
www: http://sourceforge.net/projects/firebird/
maintainer: acm@FreeBSD.org
prefix: /usr/local
licenselogic: single
flatsize: 4128038
desc: |
  Firebird is a relational database offering many ANSI SQL-99 features
  that runs on Linux, Windows, and a variety of Unix platforms.  Firebird
  offers excellent concurrency, high performance, and powerful language
  support for stored procedures and triggers.  It has been used in
  production systems, under a variety of names since 1981.

  Firebird is completely free of any registration, licensing or deployment
  fees.  It may be deployed freely for use with any third-party software,
  whether commercial or not.

  WWW: http://sourceforge.net/projects/firebird/
  WWW: http://www.firebirdsql.org/
deps:
  firebird-client: {origin: databases/firebird20-client, version: 2.0.7}
  icu: {origin: devel/icu, version: 50.1.2}
categories: [databases]
users: [firebird]
groups: [firebird]
files:
  /usr/local/bin/fb_inet_server: 6ef79d08380e1781d83e02e40fbaecb839b13f7191d6941384301dff4cd85218
  /usr/local/bin/fb_lock_mgr: de30583e83de5c5071839d8ad85b33ef240c584e92b9d5a6a814c05cfc58d5d6
  /usr/local/bin/fb_lock_print: 60d4da0b3c1833ad50104463090c959806663bd637d0ad66b12c2f864cb47fb7
  /usr/local/bin/fbstat: 8b1d344a7b41a1b5cdc1e99b96f759a42b5b5cd36a0ac9dcfef60b34d9d0211a
  /usr/local/bin/gbak: 70d69a976c579d2a066296a676463502770ea097bb684a4a9b37edafdeb63e4b
  /usr/local/bin/gdef: 0133fabb2f28c91850a63ea8daff384e7dc743bc4c2ecacff6dbb7113db8f027
  /usr/local/bin/gds_drop: 840282e9e2d5165ebcc75a186f894a37587e1bf116b52d85237f3f85545d06b3
  /usr/local/bin/gfix: d4aedc31dabe88aa0ea9bb6745b1ba26f26c19ff8719ccfecfdf489262794108
  /usr/local/bin/gsec: cdc5ec0aec0e897e64f8f789a7d305ea5277e03d6720b44bcee9849ac23076ce
  /usr/local/bin/nbackup: 0253fcf3a57899645fd05f1ae6270acc97cca695d2b14f4c168da5facbc3beb0
  /usr/local/etc/firebird/aliases.conf.sample: 0556cee2b10dcb76e2250d541f4ca3f7665c2d5c315ce1bdbafb365379da56cc
  /usr/local/libexec/firebird/intl/fbintl: 4d90fd1c41f7e133708f81fcabe253e87b4abf0891169b2cb7e640dcd36ef94e
  /usr/local/libexec/firebird/intl/fbintl.conf: 93dbfb4bdc770d6b7e70aa73a2508db8e2776a9ef864997e658ef920464ea606
  /usr/local/libexec/firebird/udf/fbudf.so: d08361882f44620e8d4ed395f701b7a7e219450d09bd7449eea9d70378da057b
  /usr/local/libexec/firebird/udf/fbudf.sql: 176f9ff4202979ee499cdaa171b3006d257e47be42b1b5a592c3aaeff38792bd
  /usr/local/libexec/firebird/udf/ib_udf.so: e52ffb5c6e4ec7a60555d6e035cdd6d4a38422027e1d4dc0b32f565392779188
  /usr/local/libexec/firebird/udf/ib_udf2.sql: 36ce56dcbbf86f4208d263489bf66e67df7d679f22934d3be05e6118d49f32d7
  /var/db/firebird/help/help.fdb: cb75fc4b5e919318add5be6257dc0a204637d20f3f1c09d30e82e406776fcf9a
  /var/db/firebird/security2.fdb.sample: 1dec07d43c594489fbd8c4537e358416b584006a15c3fc2282f96033512baa6a
directories:
  /var/db/firebird/help/: n
  /var/db/firebird/: y
  /usr/local/libexec/firebird/udf/: n
  /usr/local/libexec/firebird/intl/: n
  /usr/local/libexec/firebird/: n
  /usr/local/etc/firebird/: y
scripts:
  post-install: |
    echo "===> Creating users and/or groups."
    if ! /usr/sbin/pw groupshow firebird >/dev/null 2>&1; then  echo "Creating group 'firebird' with gid '90'.";  /usr/sbin/pw groupadd firebird -g 90; else echo "Using existing group 'firebird'."; fi
    if ! /usr/sbin/pw usershow firebird >/dev/null 2>&1; then  echo "Creating user 'firebird' with uid '90'.";  /usr/sbin/pw useradd firebird -u 90 -g 90  -c "Firebird Database Administrator" -d /var/db/firebird -s /bin/sh;  else echo "Using existing user 'firebird'."; fi
    install -d -g 90 -o 90 /var/db/firebird
    [ -f /usr/local/etc/firebird/aliases.conf ] || cp /usr/local/etc/firebird/aliases.conf.sample /usr/local/etc/firebird/aliases.conf
    cd /
    [ -f //var/db/firebird/security2.fdb ] || cp //var/db/firebird/security2.fdb.sample //var/db/firebird/security2.fdb
  pre-deinstall: |
    (cmp -s /usr/local/etc/firebird/aliases.conf /usr/local/etc/firebird/aliases.conf.sample && rm -f /usr/local/etc/firebird/aliases.conf) || true
    cd /
    (cmp -s //var/db/firebird/security2.fdb //var/db/firebird/security2.fdb.sample && rm -f //var/db/firebird/security2.fdb) || true
    [ -s //var/db/firebird/firebird.log ] || rm -f //var/db/firebird/firebird.log
    rm -f //var/db/firebird/isc_event1.`hostname` 2>/dev/null || true
    rm -f //var/db/firebird/isc_init1.`hostname` 2>/dev/null || true
    rm -f //var/db/firebird/isc_lock1.`hostname` 2>/dev/null || true
    if /usr/sbin/pw usershow firebird >/dev/null 2>&1; then  echo "==> You should manually remove the \"firebird\" user. "; fi
  post-deinstall: |
    cd /
  install: "#!/bin/sh\n\n# $FreeBSD: databases/firebird20-server/pkg-install-server
    315591 2013-03-30 04:33:48Z acm $\n\nPATH=/bin:/usr/bin:/usr/sbin\n\nbuildwarning()
    {\ncat <<EOF\n###############################################################################\n\n
    \                            ** IMPORTANT **\n\nKeep in mind that if you build
    firebird server as 'root', this may cause\nconflicts with SysV semaphores of running
    services.\n\nIf you want to cancel it, press ctrl-C now if you need check some
    things\nbefore of build it.\n\n###############################################################################\nEOF\n
    \       sleep 5\n}\n\ncase $2 in\nPRE-INSTALL)\n\tbuildwarning\n;;\n\nPOST-INSTALL)\ncd
    /var/db/firebird\n\n# Lock files\n\nfor i in isc_init1 isc_lock1 isc_event1\ndo\n\tFileName=$i.`hostname`\n\ttouch
    $FileName\n\tchmod uga=rw $FileName\n\tchown firebird:firebird $FileName\ndone\n\ntouch
    firebird.log\nchown firebird:firebird firebird.log security2.fdb\n\n;;\n\nesac\n"
message: "###############################################################################\n\nFirebird
  was installed.\n\n1) Before start the server ensure that the following line exists
  in /etc/services:\n\ngds_db\t\t3050/tcp  #InterBase Database Remote Protocol\n\n2)
  If you use inetd then add the following line to /etc/inetd.conf\n\ngds_db\tstream\ttcp\tnowait\tfirebird\t/usr/local/bin/fb_inet_server
  \ fb_inet_server\n\nAnd finally restart inetd.\n\n3) It is STRONGLY recommended
  that you change the SYSDBA\npassword with:\n\n%25 gsec -user SYSDBA -pass masterkey\nGSEC>
  modify SYSDBA -pw newpassword\nGSEC> quit\n\nbefore doing anything serious with
  Firebird.\n\n4) See documentation in /usr/local/share/doc/firebird/ for more information.\n5)
  Enjoy it ;)\n\n################################################################################\n"
