Fix whitespace goof reported by Miciah on IRC, introduced in
[elinks.git] / debian / rules
blobedc6b431d156f10884b09f5187ff1b5da538fd31
1 #!/usr/bin/make -f
3 # ELinks debian/rules that uses debhelper.
4 # GNU copyright 1997 to 1999 by Joey Hess.
7 # Uncomment this to turn on verbose mode.
8 #export DH_VERBOSE=1
10 # This is the debhelper compatibility version to use.
11 #export DH_COMPAT=2 # this should work if your debhelper is older!
12 export DH_COMPAT=4
15 # This adds the values the variable is set to to the -X options of all commands
16 # that support the -X option
17 # XXX: The last _has_ to be `Makefil', since find chokes on `Makefile'
18 export DH_ALWAYS_EXCLUDE=CVS:.cvsignore:.vimrc:MT:.mt-attrs:Makefil
21 ## Handling of DEB_BUILD_OPTIONS
23 # debug - turn on all the built-in debugging
24 # nostrip - dh_strip will take care of this
25 # noopt - compiled with a minimum of optimization
27 ifneq (,$(findstring debug, $(DEB_BUILD_OPTIONS)))
28 CONFIGURE_MODE = --enable-debug
29 endif
31 ifneq (,$(findstring noopt, $(DEB_BUILD_OPTIONS)))
32 # Export it so configure can grab it
33 export CFLAGS += -O0 -Wall
34 else
35 ifeq (,$(CONFIGURE_MODE))
36 CONFIGURE_MODE = --enable-fastmem
37 endif
38 endif
41 ## Compile Configuration
43 # with GNUTLS - due to license restictions
44 # without X - since it only needed for RESETTING the xterm title and
45 # resizing xterm windows
46 CONFIGURE_OPTIONS = \
47 --prefix=/usr \
48 --mandir=\$${prefix}/share/man \
49 --sysconfdir=/etc/elinks \
50 --with-xterm="x-terminal-emulator -e" \
51 --without-openssl \
52 --without-x \
53 --with-gnutls=/usr \
54 --with-perl --enable-nntp --enable-256-colors --enable-leds \
55 --without-spidermonkey
56 # spidermonkey: libsmjs-dev
57 # perl libperl-dev
60 # The .deb file packaging root directory
61 DEB_ROOT = `pwd`/debian/elinks
64 build: debian/build-stamp
65 debian/build-stamp:
66 dh_testdir
67 ./configure $(CONFIGURE_MODE) $(CONFIGURE_OPTIONS)
68 $(MAKE)
69 touch debian/build-stamp
71 clean:
72 dh_testdir
73 dh_testroot
75 # Add here commands to clean up after the build process.
76 -$(MAKE) distclean
78 # handle non-linux archs, patch by Robert Millan <rmh@debian.org>, bug#262350
79 cat debian/control.in \
80 | sed "s/@linux-gnu@/`type-handling any linux-gnu`/g" \
81 > debian/control
83 # -find . -name ".#*" -exec rm -rf "{}" \;
84 dh_clean
86 install: build
87 dh_testdir
88 dh_testroot
89 dh_clean -k
90 dh_installdirs
92 # Add here commands to install the package into debian/elinks.
93 $(MAKE) install DESTDIR=$(DEB_ROOT)
95 mkdir -p $(DEB_ROOT)/etc/elinks
96 install -o root -g root -m 644 contrib/elinks.conf $(DEB_ROOT)/etc/elinks/elinks.conf
97 # KDE and Gnome menu integration (freedesktop.org)
98 dh_install debian/elinks.desktop usr/share/applications/
99 # upstream CVS bug hack: remove double contrib dirs
100 -rm -rf contrib/lua/lua contrib/conv/conv contrib/guile/guile
101 # locale.alias causes conflicts and I believe it's not necessary
102 -rm -f $(DEB_ROOT)/usr/share/locale/locale.alias
104 # Build architecture-independent files here.
105 binary-indep: build install
106 # We have nothing to do by default.
108 # Build architecture-dependent files here.
109 binary-arch: build install
110 dh_testdir
111 dh_testroot
112 dh_installdebconf
113 dh_installdocs
114 dh_installexamples \
115 -X colws.diff -X elinks.spec -X hooks.lua.in -X links_wps.zip \
116 -X wipe-out-ssl -X LinksOS2Icon.zip -X js-1.5-rc6a contrib/
117 dh_installmime
118 dh_installmenu
119 dh_installman
121 # comment out for slink:
122 ## dh_installinfo
124 dh_installchangelogs ChangeLog
126 # comment out for slink:
127 ## dh_link
129 dh_strip
130 dh_compress
131 dh_fixperms
132 # dh_makeshlibs
133 dh_installdeb
134 # dh_perl
135 dh_shlibdeps
136 dh_gencontrol
137 dh_md5sums
138 dh_builddeb
140 binary: binary-indep binary-arch
141 .PHONY: build clean binary-indep binary-arch binary install