1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00
elinks/contrib/debian/rules
Kalle Olavi Niemitalo 383f95505f Move debian to contrib/debian.
Today on the elinks-dev mailing list, the new maintainer of the Debian
elinks package asked the debian directory to be removed from released
tarballs, because it makes the Debian diff hard to read.  Also, the
files there are out of date.

When the debian directory was discussed in April 2007, people didn't
want it to be removed, so I instead moved it to contrib/debian in
ELinks 0.12.GIT (599cf3d91e).
And now I'm doing the same in 0.11.3.GIT.
2008-01-06 22:27:25 +02:00

142 lines
3.4 KiB
Makefile
Executable File

#!/usr/bin/make -f
#
# ELinks debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
#
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This is the debhelper compatibility version to use.
#export DH_COMPAT=2 # this should work if your debhelper is older!
export DH_COMPAT=4
# This adds the values the variable is set to to the -X options of all commands
# that support the -X option
# XXX: The last _has_ to be `Makefil', since find chokes on `Makefile'
export DH_ALWAYS_EXCLUDE=CVS:.cvsignore:.vimrc:MT:.mt-attrs:Makefil
## Handling of DEB_BUILD_OPTIONS
#
# debug - turn on all the built-in debugging
# nostrip - dh_strip will take care of this
# noopt - compiled with a minimum of optimization
ifneq (,$(findstring debug, $(DEB_BUILD_OPTIONS)))
CONFIGURE_MODE = --enable-debug
endif
ifneq (,$(findstring noopt, $(DEB_BUILD_OPTIONS)))
# Export it so configure can grab it
export CFLAGS += -O0 -Wall
else
ifeq (,$(CONFIGURE_MODE))
CONFIGURE_MODE = --enable-fastmem
endif
endif
## Compile Configuration
#
# with GNUTLS - due to license restictions
# without X - since it only needed for RESETTING the xterm title and
# resizing xterm windows
CONFIGURE_OPTIONS = \
--prefix=/usr \
--mandir=\$${prefix}/share/man \
--sysconfdir=/etc/elinks \
--with-xterm="x-terminal-emulator -e" \
--without-openssl \
--without-x \
--with-gnutls=/usr \
--with-perl --enable-nntp --enable-256-colors --enable-leds \
--without-spidermonkey
# spidermonkey: libsmjs-dev
# perl libperl-dev
# The .deb file packaging root directory
DEB_ROOT = `pwd`/debian/elinks
build: debian/build-stamp
debian/build-stamp:
dh_testdir
./configure $(CONFIGURE_MODE) $(CONFIGURE_OPTIONS)
$(MAKE)
touch debian/build-stamp
clean:
dh_testdir
dh_testroot
# Add here commands to clean up after the build process.
-$(MAKE) distclean
# handle non-linux archs, patch by Robert Millan <rmh@debian.org>, bug#262350
cat debian/control.in \
| sed "s/@linux-gnu@/`type-handling any linux-gnu`/g" \
> debian/control
# -find . -name ".#*" -exec rm -rf "{}" \;
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/elinks.
$(MAKE) install DESTDIR=$(DEB_ROOT)
mkdir -p $(DEB_ROOT)/etc/elinks
install -o root -g root -m 644 contrib/elinks.conf $(DEB_ROOT)/etc/elinks/elinks.conf
# KDE and Gnome menu integration (freedesktop.org)
dh_install debian/elinks.desktop usr/share/applications/
# upstream CVS bug hack: remove double contrib dirs
-rm -rf contrib/lua/lua contrib/conv/conv contrib/guile/guile
# locale.alias causes conflicts and I believe it's not necessary
-rm -f $(DEB_ROOT)/usr/share/locale/locale.alias
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installdebconf
dh_installdocs
dh_installexamples \
-X colws.diff -X elinks.spec -X hooks.lua.in -X links_wps.zip \
-X wipe-out-ssl -X LinksOS2Icon.zip -X js-1.5-rc6a contrib/
dh_installmime
dh_installmenu
dh_installman
# comment out for slink:
## dh_installinfo
dh_installchangelogs ChangeLog
# comment out for slink:
## dh_link
dh_strip
dh_compress
dh_fixperms
# dh_makeshlibs
dh_installdeb
# dh_perl
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install