[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

DESTDIR build problem



I've followed the instructions of Debian New Maintainers Guide
(http://www.de.debian.org/doc/maint-guide) to create a new
package clean.

---debian/control begin---
Source: clean
Section: non-free/devel
Priority: optional
Maintainer: Stefan Karrmann <S.Karrmann@gmx.net>
Standards-Version: 2.4.0.0

Package: clean
Architecture: i386
Depends: ${shlibs:Depends}
Description: Concurrent Clean Compiler and Programming Development System 
 Concurrent Clean is a general purpose, higher order, pure and lazy
 functional programming language that can be used for the development of
 sequential, parallel or distributed executing real world applications. 
 The Concurrent Clean Programming Development System is a special
 programming environment for Concurrent Clean.
---debian/control end---

But it seems to me that the DESTDIR doesn't work.
Is there a mistake in the Makefiles or have I misunderstood
something of the build process.

debian/rules build produces the following output (### starting
lines are my comments):
---Output Begin---
dpkg-source: building clean in clean_1.3.1-1.dsc
 debian/rules build
 dh_testdir
 # Add here commands to compile the package.
 ### echo $(DESTDIR)
 echo 

 ### echo $$DESTDIR
 echo $DESTDIR

 make 
 make[1]: Entering directory `/home/sk/Package.privat/package-management/clean/version/1.3.3/src/clean-1.3.1'
 ### echo +$(DESTDIR)+
 ++
 install: cannot remove old link to `/usr/bin/clm': Permission denied
 install: cannot create regular file `/usr/bin/clm': Permission denied
 make[1]: *** [/usr/bin/clm] Error 1
 make[1]: Leaving directory `/home/sk/Package.privat/package-management/clean/version/1.3.3/src/clean-1.3.1'
 make: *** [build-stamp] Error 2
---Output End---

while debian/rules contains the lines:
---Rules Begin---
build: build-stamp
build-stamp:
        dh_testdir


	# Add here commands to compile the package.
	echo $(DESTDIR)
	echo $$DESTDIR
	$(MAKE)

	touch build-stamp
---Rules End---

and the Makefile 

---Makefile Begin---
# Edited for Debian GNU/Linux.
DESTDIR =

...

INSTALL_BIN_DIR = $(DESTDIR)/usr/bin

INSTALL_LIB_DIR = $(DESTDIR)/usr/lib/clean

INSTALL_MAN_DIR = $(DESTDIR)/usr/man

BIN_FILES = clm
INSTALL_BIN_FILES = $(BIN_FILES:%=$(INSTALL_BIN_DIR)/%)

default: install

install: install_bin install_stdenv install_man $(PATCHES)

install_bin : $(INSTALL_BIN_DIR) $(INSTALL_BIN_FILES) \
              $(INSTALL_EXE_DIR) $(INSTALL_EXE_FILES) \
              $(INSTALL_IDE_FILES) $(INSTALL_HELP_FILES)


$(INSTALL_BIN_DIR)/% : bin/%
        echo +$(DESTDIR)+
        install -m 711 $< $@

...
---Makefile End---

Thanks for your hints,
-- 
Stefan Karrmann


Reply to: