dnl Important: This is a debian control file template which is preprocessed by m4 from the Makefile.
dnl Please be gentle (and test your changes in all relevant configurations!).
dnl
dnl List of macros to be substituted (please update, if you're adding some):
dnl   PACKAGE_NAME - package name to be used (e.g. rethinkdb)
dnl   PACKAGE_VERSION - version string, dashes are fine
dnl   LEGACY_LINUX - 0 or 1 (specifies which library versions we can use)
dnl   CURRENT_ARCH - amd64 or i386
dnl   VERSIONED_QUALIFIED_PACKAGE_NAME - something like rethinkdb-portable or rethinkdb-portable-1.2 at the discretion of the Makefile
dnl   SOURCEBUILD - 0 or 1 (whether this is for a source package)
dnl   STATIC_V8 - 0 or 1 (whether V8 is linked statically)
dnl   TC_BUNDLED - 0 or 1 (whether we bundle certain toolchain pieces in the source package)
dnl   BUILD_DRIVERS - 0 or 1
dnl
define(`concatmove',`$1$2')dnl
Source: VERSIONED_QUALIFIED_PACKAGE_NAME
Section: database
Priority: optional
Maintainer: Package Maintainer <packaging@rethinkdb.com>
define(`BASE_DEPENDS',`Build-Depends: g++, libboost-dev, libssl-dev, libboost-program-options-dev, curl, exuberant-ctags, m4, debhelper, fakeroot, python, openjdk-6-jdk')dnl
define(`NODEJS_DEPENDS_EXTRA',`ifelse(NODEJS_NEW,1,`, nodejs-legacy',`')')dnl
define(`V8_DEPENDS_EXTRA',`ifelse(STATIC_V8,0,`, libv8-dev',`')')dnl
define(`PROTOC_DEPENDS_EXTRA',`ifelse(TC_BUNDLED,0,`, protobuf-compiler, protobuf-c-compiler, libprotobuf-dev, libprotobuf-c0-dev, libprotoc-dev',`')')dnl
define(`NODE_DEPENDS_EXTRA',`ifelse(TC_BUNDLED,0,`, npm',`')')dnl
define(`GPERFTOOLS_DEPENDS_EXTRA',`ifelse(TC_BUNDLED,0,`, libgoogle-perftools-dev',`')')dnl
define(`RUBY_DEPENDS_EXTRA',`ifelse(BUILD_DRIVERS,0,`, ruby, rubygems',`')')dnl
BASE_DEPENDS`'NODEJS_DEPENDS_EXTRA`'V8_DEPENDS_EXTRA`'PROTOC_DEPENDS_EXTRA`'NODE_DEPENDS_EXTRA`'GPERFTOOLS_DEPENDS_EXTRA`'RUBY_DEPENDS_EXTRA
Homepage: http://www.rethinkdb.com
ifelse(SOURCEBUILD, 1, `
',`')dnl
Package: VERSIONED_QUALIFIED_PACKAGE_NAME
Version: PACKAGE_VERSION
Architecture: ifelse(SOURCEBUILD, 1,`i386 amd64', `CURRENT_ARCH')
Pre-Depends: adduser (>= 3.40)
Depends: ifelse(LEGACY_PACKAGE, 1,
  `libc6 (>= 2.5), libstdc++6 (>= 4.4), libgcc1',
  `libc6 (>= 2.10.1), libstdc++6 (>= 4.6), libgcc1, libprotobuf7')`'dnl
ifelse(STATIC_V8, 0, `, libv8-dev (>= 3.1)', `')
Breaks: PACKAGE_NAME (<< PACKAGE_VERSION)
Conflicts: PACKAGE_NAME (<< PACKAGE_VERSION)
Provides: PACKAGE_NAME
ifelse(SOURCEBUILD, 1, `', `Installed-Size: DISK_SIZE
')dnl
Description: RethinkDB supports replication, sharding, and powerful queries via its JavaScript, Python, and Ruby bindings.
ifelse(SOURCEBUILD, 1,`
Package: VERSIONED_QUALIFIED_PACKAGE_NAME`'-dbg
Version: PACKAGE_VERSION
Architecture: i386 amd64
Pre-Depends: adduser (>= 3.40)
Depends: ifelse(LEGACY_LINUX, 1, `libc6 (>= 2.5), libstdc++6 (>= 4.6), libgcc1',
  `libc6 (>= 2.10.1), libstdc++6 (>= 4.6), libgcc1')`'dnl
ifelse(STATIC_V8, 0, `, libv8-dev (>= 3.1)', `')`, 'VERSIONED_QUALIFIED_PACKAGE_NAME` '(= PACKAGE_VERSION)
Breaks: PACKAGE_NAME (<< PACKAGE_VERSION)
Conflicts: PACKAGE_NAME (<< PACKAGE_VERSION)
Provides: PACKAGE_NAME`'-dbg
Description: RethinkDB supports replication, sharding, and powerful queries via its JavaScript, Python, and Ruby bindings. This package provides debug symbols.
',`')

