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