To use xbps now 'make and make install' is required.

--HG--
extra : convert_revision : 976738f26daf1ccd2101ca2325e1e517d98e71cb
This commit is contained in:
Juan RP 2008-12-22 02:14:40 +01:00
parent 9f7bfc772a
commit 6ee35486bf
9 changed files with 52 additions and 15 deletions

View file

@ -10,13 +10,20 @@ all:
.PHONY: install .PHONY: install
install: install:
install -D xbps-src.sh $(BINDIR)/xbps-src install -D xbps-src.sh $(SBINDIR)/xbps-src
for dir in $(SUBDIRS); do \ for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir install; \ $(MAKE) -C $$dir install; \
done done
@echo
@echo "Binaries have been installed into $(SBINDIR)."
@echo "Librares have been installed into $(LIBDIR)."
@echo
@echo "WARNING: Don't forget to rerun ldconfig(1)."
@echo
uninstall: uninstall:
-rm -f $(BINDIR)/xbps-* -rm -f $(SBINDIR)/xbps-*
-rm -f $(LIBDIR)/libxbps.so*
.PHONY: clean .PHONY: clean
clean: clean:

View file

@ -1,7 +1,7 @@
include ../vars.mk include ../vars.mk
EXTRA_CFLAGS = -funroll-all-loops -ftree-loop-linear EXTRA_CFLAGS = -funroll-all-loops -ftree-loop-linear
LDFLAGS += -L../lib -Wl,-rpath $$(pwd)/../lib -lxbps LDFLAGS += -L../lib -lxbps
BINS = xbps-bin xbps-cmpver xbps-digest xbps-pkgdb BINS = xbps-bin xbps-cmpver xbps-digest xbps-pkgdb
@ -30,4 +30,5 @@ clean-objs:
-rm -f *.o -rm -f *.o
install: $(BINS) install: $(BINS)
install -D $(BINS) install -d $(SBINDIR)
install -m 755 $(BINS) $(SBINDIR)

View file

@ -49,10 +49,14 @@ PLEASE NOTE THAT fakechroot or fakeroot-ng DO NOT WORK.
HOW TO USE IT HOW TO USE IT
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Before using xbps, some required utilities need to be built in the Before using xbps, some required utilities need to be built and installed
bin and lib directories. You can do this by issuing "make" in the top level into $(PREFIX); by default they are installed into /usr/local.
directory and edit the configuration file located at the xbps directory. You can do this by issuing "make" and "make install" as root in the top
By default it uses the xbps directory in your $HOME. level directory.
Now you should edit the configuration file located in the etc directory
in the top level directory. By default it uses the xbps directory in
your $HOME.
If configuration file is not specified from the command line with the If configuration file is not specified from the command line with the
-c flag, it will first try to use the default location at -c flag, it will first try to use the default location at

View file

@ -16,6 +16,10 @@ $(LIBXBPS): sha256.o plist.o
-ln -sf $(LIBXBPS_SO) $(LIBXBPS).$(MAJOR) -ln -sf $(LIBXBPS_SO) $(LIBXBPS).$(MAJOR)
-ln -sf $(LIBXBPS_SO) $(LIBXBPS) -ln -sf $(LIBXBPS_SO) $(LIBXBPS)
install: $(LIBXBPS)
install -d $(LIBDIR)
install -m 644 $(LIBXBPS_SO) $(LIBDIR)
.PHONY: clean .PHONY: clean
clean: clean-lib clean-objs clean: clean-lib clean-objs

View file

@ -207,7 +207,7 @@ check_installed_pkg()
iver="$($XBPS_REGPKGDB_CMD version $pkgname)" iver="$($XBPS_REGPKGDB_CMD version $pkgname)"
if [ -n "$iver" ]; then if [ -n "$iver" ]; then
$XBPS_CMPVER_CMD $pkgname-$iver $pkgname-$reqver xbps-cmpver $pkgname-$iver $pkgname-$reqver
[ $? -eq 0 ] && return 0 [ $? -eq 0 ] && return 0
fi fi

View file

@ -122,6 +122,28 @@ rebuild_ldso_cache()
echo " done." echo " done."
} }
install_xbps_utils()
{
local needed=
local xbps_prefix=$XBPS_MASTERDIR/usr/local
for f in bin cmpver digest pkgdb; do
if [ ! -x $xbps_prefix/sbin/xbps-${f} ]; then
needed=yes
fi
done
if [ -n "$needed" ]; then
echo "=> Building and installing xbps utils."
chroot $XBPS_MASTERDIR sh -c \
"echo /usr/local/lib > /etc/ld.so.conf"
chroot $XBPS_MASTERDIR make -C /xbps
chroot $XBPS_MASTERDIR make -C /xbps install
chroot $XBPS_MASTERDIR make -C /xbps clean
rebuild_ldso_cache
fi
}
xbps_chroot_handler() xbps_chroot_handler()
{ {
local action="$1" local action="$1"
@ -135,6 +157,8 @@ xbps_chroot_handler()
rebuild_ldso_cache rebuild_ldso_cache
mount_chroot_fs mount_chroot_fs
install_xbps_utils
if [ "$action" = "chroot" ]; then if [ "$action" = "chroot" ]; then
env in_chroot=yes chroot $XBPS_MASTERDIR /bin/bash env in_chroot=yes chroot $XBPS_MASTERDIR /bin/bash
else else

View file

@ -34,7 +34,7 @@ verify_sha256_cksum()
[ -z "$file" -o -z "$cksum" ] && return 1 [ -z "$file" -o -z "$cksum" ] && return 1
filesum=$($XBPS_DIGEST_CMD $XBPS_SRCDISTDIR/$file) filesum=$(xbps-digest $XBPS_SRCDISTDIR/$file)
if [ "$origsum" != "$filesum" ]; then if [ "$origsum" != "$filesum" ]; then
msg_error "SHA256 checksum doesn't match for $file." msg_error "SHA256 checksum doesn't match for $file."
fi fi

View file

@ -1,7 +1,7 @@
# Common variables. # Common variables.
PREFIX ?= /usr/local PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin SBINDIR ?= $(PREFIX)/sbin
LIBDIR ?= $(PREFIX)/lib LIBDIR ?= $(PREFIX)/lib
CPPFLAGS += -I../include CPPFLAGS += -I../include

View file

@ -103,9 +103,6 @@ set_defvars()
: ${XBPS_REGPKGDB_PATH:=$XBPS_CACHEDIR/regpkgdb.plist} : ${XBPS_REGPKGDB_PATH:=$XBPS_CACHEDIR/regpkgdb.plist}
: ${XBPS_PKGMETADIR:=$XBPS_CACHEDIR/metadata} : ${XBPS_PKGMETADIR:=$XBPS_CACHEDIR/metadata}
: ${XBPS_SHUTILSDIR:=$XBPS_DISTRIBUTIONDIR/shutils} : ${XBPS_SHUTILSDIR:=$XBPS_DISTRIBUTIONDIR/shutils}
: ${XBPS_DIGEST_CMD:=$XBPS_DISTRIBUTIONDIR/bin/xbps-digest}
: ${XBPS_REGPKGDB_CMD:=$XBPS_DISTRIBUTIONDIR/bin/xbps-pkgdb}
: ${XBPS_CMPVER_CMD:=$XBPS_DISTRIBUTIONDIR/bin/xbps-cmpver}
local DDIRS="XBPS_TEMPLATESDIR XBPS_HELPERSDIR XBPS_SHUTILSDIR" local DDIRS="XBPS_TEMPLATESDIR XBPS_HELPERSDIR XBPS_SHUTILSDIR"
for i in ${DDIRS}; do for i in ${DDIRS}; do
@ -114,7 +111,7 @@ set_defvars()
done done
XBPS_REGPKGDB_CMD="env XBPS_REGPKGDB_PATH=$XBPS_REGPKGDB_PATH \ XBPS_REGPKGDB_CMD="env XBPS_REGPKGDB_PATH=$XBPS_REGPKGDB_PATH \
$XBPS_REGPKGDB_CMD" xbps-pkgdb"
} }
# #