1
# Makefile for dhelp project
3
# Copyright (C) 2005 Esteban Manchado Vel�zquez <zoso@debian.org>
5
# This file is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License as published by the
7
# Free Software Foundation; either version 2, or (at your option) any
10
# This file is distributed in the hope that it will be
11
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
12
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
# General Public License for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with this file; see the file COPYING. If not, write to the Free
17
# Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
21
PREFIX_ = $(if $(PREFIX),$(PREFIX),/usr/local)
22
DESTDIR_ = $(DESTDIR)/$(PREFIX_)
27
mkdir -p $(DESTDIR_) $(DESTDIR_)/sbin $(DESTDIR_)/bin $(DESTDIR_)/lib/cgi-bin $(DESTDIR_)/share/doc/dhelp
29
install dhelp_parse.rb $(DESTDIR_)/sbin/dhelp_parse.rb
31
mkdir -p $(DESTDIR_)/lib/ruby/1.8
32
cp lib/* $(DESTDIR_)/lib/ruby/1.8
33
# Update PREFIX variable in dhelp_parse.rb
34
sed 's|^PREFIX = .*|PREFIX = "$(PREFIX_)"|' $(DESTDIR_)/sbin/dhelp_parse.rb >$(DESTDIR_)/sbin/dhelp_parse
35
rm -f $(DESTDIR_)/sbin/dhelp_parse.rb
36
chmod a+x $(DESTDIR_)/sbin/dhelp_parse
37
install dhelp $(DESTDIR_)/bin/dhelp
38
install dsearch $(DESTDIR_)/lib/cgi-bin/dsearch
40
for file in CREDITS doc/*; do \
41
cp $$file $(DESTDIR_)/share/doc/dhelp/; \
43
mkdir -p $(DESTDIR_)/share/doc/HTML
44
mkdir -p $(DESTDIR_)/share/dhelp
45
cp {index,category}.rhtml $(DESTDIR_)/share/dhelp/
48
RUBYLIB=lib:test ruby -w test/ts_dhelp.rb