Changeset 43

Show
Ignore:
Timestamp:
05/31/05 03:59:20 (4 years ago)
Author:
athomas
Message:
  • Fixed wrapping problem on Arch (informational).
  • Added --detect-os which displays the O/S bpkg thinks you are running.
  • Makefile now has detection for O/S and will only install installwatch
    if it knows your O/S does not have it packaged.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • bpkg/trunk/bpkg

    r42 r43  
    164164        local configs=`(cd $DESTROOT && find etc -type f) 2> /dev/null` 
    165165        local deps=`(cd $DESTROOT && find . -type f | xargs --no-run-if-empty file | grep 'ELF.*executable' | cut -d: -f1 | xargs --no-run-if-empty ldd 2> /dev/null | awk '{print $3}' | grep ^/ | xargs --no-run-if-empty pacman -Qo 2> /dev/null | awk '{print $5}' | sort | uniq) 2> /dev/null` 
    166         notice "detected configuration files: $configs" 
    167         notice "detected dependencies: $deps" 
     166        notice "detected configuration files: "$configs 
     167        notice "detected dependencies: "$deps 
    168168        cd $TMPDIR 
    169169        cat <<-EOF > PKGBUILD 
     
    296296                                exit 0 
    297297                        ;; 
     298                        --detect-os) 
     299                                (detect_os) 2> /dev/null || echo unknown 
     300                                exit 0 
     301                        ;; 
    298302                        --help) 
    299303                        cat <<EOF 
     
    309313  --help 
    310314    This help. 
     315  --detect-os 
     316    Display the O/S that bpkg thinks you are running. 
    311317  --version 
    312318    Show $SELF version. 
  • bpkg/trunk/Makefile

    r41 r43  
    33INSTALLWATCH=installwatch-0.6.3 
    44DIST=bpkg Makefile README COPYING $(INSTALLWATCH).tgz 
     5OS=$(shell ./bpkg --detect-os) 
    56 
    6 all: $(INSTALLWATCH) 
    7         $(MAKE) -C $(INSTALLWATCH) PREFIX=/usr 
     7.PHONY: $(OS)-build $(OS)-install 
    88 
    9 install: $(INSTALLWATCH) 
     9all: $(OS)-build 
     10 
     11install: all $(OS)-install 
    1012        mkdir -p $(DESTDIR)$(PREFIX)/bin 
    1113        mkdir -p $(DESTDIR)$(PREFIX)/lib 
     
    1517 
    1618$(INSTALLWATCH): $(INSTALLWATCH).tgz 
     19        $(MAKE) 
    1720        rm -rf $(INSTALLWATCH) 
    1821        gzip -dc $(INSTALLWATCH).tgz | tar xf - 
     
    2831clean: 
    2932        rm -rf $(INSTALLWATCH) 
     33 
     34unknown-build: 
     35        @echo "FATAL: Unknown operating system/distribution. Need detection and" 
     36        @echo "       backend code in bpkg." 
     37        @exit 1 
     38 
     39arch-install: 
     40        @echo  
     41        @echo "Run 'pacman -S installwatch' to install installwatch." 
     42        @echo 
     43 
     44gentoo-build: $(INSTALLWATCH) 
     45        $(MAKE) -C $(INSTALLWATCH) PREFIX=/usr 
     46 
     47gentoo-install: 
     48        $(MAKE) -C $(INSTALLWATCH) PREFIX=$(PREFIX) BINDIR=$(DESTDIR)$(PREFIX)/bin LIBDIR=$(DESTDIR)$(PREFIX)/lib install