# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../s6/s6.conf
# Copyright (C) 2011 - 2013 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# 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; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---

if [ "$prefix_auto" = 1 ]; then
        prefix="usr"
        set_confopt
fi

# execline is following slashpackage confentions
srcdir=admin/$pkg-$ver

s6_conf() {
	pkgprefix -t execline
	echo "$( pkgprefix -r libdir execline )" >> conf-compile/path-library
	echo "$( pkgprefix -r libdir execline )" >> conf-compile/path-library.so
	echo "$( pkgprefix -r includedir execline )" >> conf-compile/path-include
}
hook_add preconf 9 's6_conf'

# install missing files
s6_install_missing() {
	# TODO check why the following stuff is not installed
	install -m 0755 command/s6-ftrigrd $root/$bindir
	cp -avp include/* $root$includedir
	cp -avp doc/* $root$docdir
}
hook_add postmake 9 's6_install_missing'