$DESTDIR for ufo #5

Merged
merged 2 commits into from Mar 12, 2013

Conversation

Projects
None yet
3 participants
Contributor

mpkh commented Mar 12, 2013

formed makefile

.PHONY: all build test install clean distclean purge

PERL6  = perl6
DESTDIR= 
PREFIX = /usr/lib/parrot/5.1.0/languages/perl6/site
BLIB   = blib
P6LIB  = $(PWD)/$(BLIB)/lib:$(PWD)/lib:$(PERL6LIB)
CP     = cp -p
MKDIR  = mkdir -p

SCRIPTS= bin/ignore
BLIB_PIRS =

all build: $(BLIB_PIRS)



test: build
        env PERL6LIB=$(P6LIB) prove -e '$(PERL6)' -r t/

loudtest: build
        env PERL6LIB=$(P6LIB) prove -ve '$(PERL6)' -r t/

timetest: build
        env PERL6LIB=$(P6LIB) PERL6_TEST_TIMES=1 prove -ve '$(PERL6)' -r t/

install: $(BLIB_PIRS)
        $(MKDIR) $(DESTDIR)$(PREFIX)/bin
        $(CP) $(SCRIPTS) $(DESTDIR)$(PREFIX)/bin


clean:
        rm -fr $(BLIB)

distclean purge: clean
        rm -r Makefile
Collaborator

tadzik commented Mar 12, 2013

How is that different from the existing PREFIX?

Contributor

mpkh commented Mar 12, 2013

PREFIX determines where the port will be installed. It defaults to /usr/local, but can be set by the user to a custom path like /opt. Your port must respect the value of this variable.

DESTDIR, if set by the user, determines the complete alternative environment, usually a jail or an installed system mounted somewhere other than /. A port will actually install into DESTDIR/PREFIX, and register with the package database in DESTDIR/var/db/pkg. As DESTDIR is handled automatically by the ports infrastructure with chroot(8), you do not need any modifications or any extra care to write DESTDIR-compliant ports.

source: http://www.freebsd.org/doc/en/books/porters-handbook/porting-prefix.html

masak added a commit that referenced this pull request Mar 12, 2013

@masak masak merged commit a4e9a53 into masak:master Mar 12, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment