##################### GENERAL ##################### 
GARNAME = vmailmgr-utils
GARVERSION = 1.0.0
GARELEASE = 2
HOME_URL = https://iztaci.com/software/vmailmgr-utils
CATEGORIES = net/mail
MASTER_SITES +=
DISTFILES = vmailmgr-utils-$(GARVERSION).tar.gz
PATCHFILES = 
MAINTAINER = Felipe Sanchez <izto@asic-linux.com.mx>
LICENSE = Mixed GPL / LGPL

DESCRIPTION = Utilities for working with Bruce Guenter's vmailmgr
define BLURB
Included utilities:
   pipeauth-vmailmgrd

This package also includes Daniel Lorch's vmailmgr php access library

endef

##################### PACKAGING #####################


#IZTACI_PACKAGE_PATH =

# Users and groups the binary package will create
# WHEN INSTALLED ON THE DESTINATION SYSTEM
CREATE_GROUPS = 
CREATE_USERS = 

# This is to be appended to the package's installation script
# Use it to set file owners, permissions, DB initialization, etc.
# Remember any shell variables (Such as $ROOT) have to be escaped
# like this: \$$ROOT

define DOINST_APPEND
endef

# Required dependencies
define SLACK_REQUIRED
php
endef

# Suggested dependencies
define SLACK_SUGGESTS
vmailmgr
endef

# Package conflicts (lprng vs cups for example)
define SLACK_CONFLICTS
endef



##################### BUILDING #####################


CONFIGURE_SCRIPTS = 
BUILD_SCRIPTS = 
INSTALL_SCRIPTS = custom

CONFIGURE_ARGS = $(DIRPATHS)
NODIRPATHS = 

# Directories to be created as part of the install process.
# Can be inside the final package or just transient dirs we need
# while building it.
INSTALL_DIRS += $(DESTDIR)/usr/lib/php/vmailmgr
INSTALL_DIRS += $(DESTDIR)/$(mandir)/man1
INSTALL_DIRS += $(DESTDIR)/$(libexecdir)

# If some dirs are trying to install into /, list their names
# here, such as: prefix bindir mandir
INSTALL_OVERRIDE_DIRS = 


# Dependencies are of the form categorydir/packagedir
# LIBDEPS are for libraries, and DEPENDS are for everything else
DEPENDS =
LIBDEPS =
DEPENDS =
# Builddeps are installed in the build DESTIMG
BUILDDEPS =

##################### GAR #####################

# This should go before any hand-made rules.
include config.mk
include ../level.mk

##################### CUSTOMIZING #####################

test:
	@echo
	@echo -e "$(WARNCOLOR)No tests are available for this package$(NORMALCOLOR)"
	@echo
	$(MAKECOOKIE)

install-custom:
	install -v -m 0644 -o root -g root $(WORKSRC)/php-library/vm.interface.php $(DESTDIR)/usr/lib/php/vmailmgr
	install -v -m 0755 -o root -g root $(WORKSRC)/authmods/* $(DESTDIR)/usr/libexec
	install -v -m 0644 -o root -g root $(WORKSRC)/man/pipeauth-vmailmgrd.1 $(DESTDIR)/$(mandir)/man1
	$(MAKECOOKIE)

post-install:
	$(MAKE) test
	$(MAKE) gzip-man
	$(MAKECOOKIE)

