debian swirl logo

Back to the packages list addresses-for-gnustep

#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DEB_GS_FRAMEWORKS = Addresses AddressView
DEB_GS_APPLICATIONS = AddressManager

DEB_GS_DEVPKG_NAME_Addresses = libaddresses-dev
DEB_GS_DEVPKG_NAME_AddressView = libaddressview-dev

include /usr/share/cdbs/1/rules/gnustep.mk
include /usr/share/cdbs/1/class/gnumakefile.mk

DEB_GS_AUTO_LINTIAN_OVERRIDES = y
DEB_GS_AUTO_DH_INSTALL = y

DEB_DH_SHLIBDEPS_INCLUDE = $(DEB_DESTDIR)/$(GNUSTEP_SYSTEM_LIBRARIES)
DEB_DH_MAKESHLIBS_ARGS = -V

DEB_INSTALL_MANPAGES_addressmanager.app = debian/AddressManager.1
DEB_INSTALL_MANPAGES_addresses-goodies-for-gnustep = debian/adgnumailconverter.1 debian/adserver.1 debian/addresstool.1

DH_INSTALL_DOCS_addressmanager.app = README THANKS TODO NEWS AUTHORS
DH_INSTALL_DOCS_addresses-goodies-for-gnustep = Goodies/README THANKS TODO NEWS AUTHORS
DH_INSTALL_DOCS_addresses.framework = Frameworks/Addresses/README \
					    THANKS TODO NEWS AUTHORS
DH_INSTALL_DOCS_libaddresses0 = $(DH_INSTALL_DOCS_addresses.framework)
DH_INSTALL_DOCS_libaddresses-dev = $(DH_INSTALL_DOCS_addresses.framework)
DH_INSTALL_DOCS_addressview.framework = Frameworks/AddressView/README.Localize \
					    THANKS TODO NEWS AUTHORS
DH_INSTALL_DOCS_libaddressview0 = $(DH_INSTALL_DOCS_addressview.framework)
DH_INSTALL_DOCS_libaddressview-dev = $(DH_INSTALL_DOCS_addressview.framework)

# package names
p_addr		= addresses.framework
p_addrlib	= libaddresses0
p_addrdev	= libaddresses-dev
p_adv		= addressview.framework
p_advlib	= libaddressview0
p_advdev	= libaddressview-dev
p_adm		= addressmanager.app
p_good		= addresses-goodies-for-gnustep

# package temp dirs
d_addr		= $(CURDIR)/debian/$(p_addr)
d_addrlib	= $(CURDIR)/debian/$(p_addrlib)
d_addrdev	= $(CURDIR)/debian/$(p_addrdev)
d_adv		= $(CURDIR)/debian/$(p_adv)
d_advlib	= $(CURDIR)/debian/$(p_advlib)
d_advdev	= $(CURDIR)/debian/$(p_advdev)
d_adm		= $(CURDIR)/debian/$(p_adm)
d_good		= $(CURDIR)/debian/$(p_good)

# Additional dir for goodies
ADDITIONAL_INCLUDE_DIRS= " -I$(CURDIR)/Frameworks"
ADDITIONAL_LIB_DIRS= " -L$(CURDIR)/Frameworks/Addresses/Addresses.framework/Versions/Current  -L$(CURDIR)/Frameworks/AddressView/AddressView.framework/Versions/Current"

build/addresses-goodies-for-gnustep::
	ADDITIONAL_INCLUDE_DIRS= $(ADDITIONAL_INCLUDE_DIRS) \
	    ADDITIONAL_LIB_DIRS= $(ADDITIONAL_LIB_DIRS) \
	    gs_make -C Goodies messages= yes

install/addresses-goodies-for-gnustep::
		: # install Goodies
	gs_make -C Goodies $(DEB_MAKE_INSTALL_TARGET) DESTDIR= $(d_good)
		@: # alias adtool to addresstool to avoid conflict with adtool package
		mv $(d_good)/$(GNUSTEP_SYSTEM_TOOLS)/adtool $(d_good)/$(GNUSTEP_SYSTEM_TOOLS)/addresstool
		mkdir -p $(CURDIR)/$(d_good)/usr/bin

install/addressmanager.app::
		: # Install XPM Icons
		dh_installdirs -p$(p_adm) usr/share/pixmaps
		cp debian/AddressManager.xpm $(d_adm)/usr/share/pixmaps/
	# cp -p $(CURDIR)/debian/AddressManager16.xpm $(CURDIR)/$(d_adm)/usr/share/pixmaps/

binary-post-install/libaddresses-dev::
	# Fix symlink
#	rm -f $(CURDIR)/$(d_addrdev)/$(GNUSTEP_SYSTEM_HEADERS)/AddressBook
		dh_link -p$(p_addrdev) $(GNUSTEP_SYSTEM_HEADERS)/Addresses $(GNUSTEP_SYSTEM_HEADERS)/AddressBook

common-binary-post-install-arch::
	# Remove CVS dirs
		for dir in `find debian -name "CVS" -type d`; do \
		    rm -rf $$dir ; done

	# Fix Add.tiff files permissions
		for file in `find debian -name "Add.tiff"`; do \
		    chmod -v 644 $$file ; done

	# Fix .strings files permissions
		for file in `find debian -name "*.strings"`; do \
		    chmod -v 644 $$file ; done

	# Fix data.classes files permissions
		for file in `find debian -name "data.classes"`; do \
		    chmod -v 644 $$file ; done

	# Fix objects.gorm files permissions
		for file in `find debian -name "objects.gorm"`; do \
		    chmod -v 644 $$file ; done

	# Fix ISOCountryCodes.dict files permissions
		for file in `find debian -name "ISOCountryCodes.dict"`; do \
		    chmod -v 644 $$file ; done

Builds:

addresses.framework
database api backend framework for gnustep
addresses-goodies-for-gnustep
personal address manager for gnustep (goodies)
addressmanager.app
personal address manager for gnustep
addressview.framework
address display/edit framework for gnustep
libaddresses0
database api backend framework for gnustep (library files)
libaddresses-dev
database api backend framework for gnustep (development files)
libaddressview0
address display/edit framework for gnustep (library files)
libaddressview-dev
address display/edit framework for gnustep (development files)