---
name: firebird-server
version: 2.5.2_1
origin: databases/firebird25-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: 6857625
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/firebird25-client, version: 2.5.2_1}
  icu: {origin: devel/icu, version: 50.1.2}
categories: [databases]
users: [firebird]
groups: [firebird]
files:
  /usr/local/bin/fbguard: 5fad2ca52e7402c07eb12b747c70696626c5e12932a19aaf63325d1d2f0e1520
  /usr/local/bin/fbsplit: dff0ff1aff4e6b20b58e9477ea110cddbb5da496b0541b0b8399961163b18387
  /usr/local/bin/fbstat: c92460aac96f3c29180da0efa91c69b5adf8472b0faef9bc33dd927cd9d0c479
  /usr/local/bin/fbsvcmgr: 0a5a6b12e33a66765d3e625d0355722e9f083ad0329c28fa3f543881138ae804
  /usr/local/bin/fbtracemgr: 24fff95ceb815012ad4caef4a310c5f776908eed184e1590981a34c0d320c7c0
  /usr/local/bin/gbak: c7c7311911edcadfd13204f46db51f16a723c831576e7fbe632426a8e1bf8f71
  /usr/local/bin/gdef: 4f0f7b856201c7be626e4803aa22a9707c9203ae9f0bab675f6eaa0794dfc861
  /usr/local/bin/gfix: 9ef6e9aef205de8112dc17230890fd0902a3314db42af65f349c15ea7a268d78
  /usr/local/bin/gsec: f13efdf72044b09cf527323e787be34ff9213f9a4488166e3f51af7866c1668e
  /usr/local/bin/nbackup: d73ec84cee9e6efeac81366eca61cbede842ae0a6f01bf7d1c885906223aec72
  /usr/local/etc/firebird/aliases.conf.sample: 489554b87756d3795d9f0b63ece9e9c997753a0772ff530528989c9ec5f1f2b6
  /usr/local/etc/firebird/fbintl.conf: 30f0567504027f567bc3076cde91e2aaffb0b441fe9a29395063a8da2f439b94
  /usr/local/etc/firebird/fbtrace.conf: f13ed367cdd5fdb2eba42d87f342672f7cdcd48dd8d2e6c7dcf6ac290b516112
  /usr/local/etc/rc.d/firebird: d7261905c3a496a003ef0c0344fb3323920f3ce70adc4a927cea75ab63af6d9c
  /usr/local/libexec/firebird/intl/fbintl: c14b2c7fd845a92b9c28fb702733d81156a7ba0ae8f37e44c87363c44cc22945
  /usr/local/libexec/firebird/plugins/libfbtrace.so: 570cf2de86fb87218e79f75f81d8826f5174f42e6dd3d1cdfce36c6ae9e95e05
  /usr/local/libexec/firebird/udf/fbudf.so: f9282dbb8dfc71eae813de77806e4840990d318c4bf1dad437cc75828f0da224
  /usr/local/libexec/firebird/udf/fbudf.sql: f560ec275c4fe9438c14abcbf31d98cc8cd61d5c07e06ce50f82499b39f97720
  /usr/local/libexec/firebird/udf/ib_udf.so: e53a87674dc6a46dfa81bf923a87f7a43281a9862e41f976147cf1cdf81d36aa
  /usr/local/libexec/firebird/udf/ib_udf2.sql: 3253f86ab916b2635f960b5ddf6c320a0bd46198d2dbcf4eb261889bbbd3a60e
  /usr/local/sbin/fb_inet_server: 9617d7d7544eb1954aea8cec94016a233a41e7428311653a52cd3ae05548e2d7
  /usr/local/sbin/fb_lock_print: 588cece7f68b33f8284bf269657081d8620b7df33a4ec0f45ea6e20bfebfbcad
  /usr/local/sbin/fb_smp_server: 3b6ee2ea1498cee502c5255a9a2f453a349435a48259306dde74865c43b1f349
  /var/db/firebird/help/help.fdb: ace65aec2603cc65fb8406a5b8c5fddfe8815196a4cd30f13971f44ea58e15dc
  /var/db/firebird/security2.fdb.sample: cd73ae33a63590a49e3bcbc28930ce976cfe9098c1024d7035efff7f219de435
directories:
  /var/db/firebird/help/: n
  /var/db/firebird/: y
  /usr/local/libexec/firebird/udf/: n
  /usr/local/libexec/firebird/plugins/: 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
    cd /usr/local
  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
    cd /usr/local
  post-deinstall: |
    cd /
    cd /usr/local
  install: "#!/bin/sh\n\n# $FreeBSD: /tmp/pcvs/ports/databases/firebird25-server/files/pkg-install.in,v
    1.2 2011-07-10 17:37:11 crees Exp $\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;;\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/sbin/fb_inet_server
  \ fb_inet_server\n\nAnd finally restart inetd.\n\n3) If you want to use SuperClassic
  Server then you can add firebird_enable=\"YES\"\nto /etc/rc.conf file.\n\n4) It
  is STRONGLY recommended that you change the SYSDBA\npassword with:\n\n # gsec -user
  SYSDBA -pass masterkey\n GSEC> modify SYSDBA -pw newpassword\n GSEC> quit\n\nbefore
  doing anything serious with Firebird.\n\n5) See documentation in /usr/local/share/doc/firebird/
  for more information.\n\n6) Some firebird tools were renamed for avoid conflicts
  with some other ports\n\n\t/usr/local/bin/isql\t-> \t/usr/local/bin/isql-fb\n\t/usr/local/bin/gstat\t->\t/usr/local/bin/fbstat\n\t/usr/local/bin/gsplit\t->\t/usr/local/bin/fbsplit\n\n7)
  Enjoy it ;)\n\n################################################################################\n"
