To use xbps now 'make and make install' is required.
--HG-- extra : convert_revision : 976738f26daf1ccd2101ca2325e1e517d98e71cb
This commit is contained in:
parent
9f7bfc772a
commit
6ee35486bf
11
Makefile
11
Makefile
@ -10,13 +10,20 @@ all:
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
install -D xbps-src.sh $(BINDIR)/xbps-src
|
||||
install -D xbps-src.sh $(SBINDIR)/xbps-src
|
||||
for dir in $(SUBDIRS); do \
|
||||
$(MAKE) -C $$dir install; \
|
||||
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:
|
||||
-rm -f $(BINDIR)/xbps-*
|
||||
-rm -f $(SBINDIR)/xbps-*
|
||||
-rm -f $(LIBDIR)/libxbps.so*
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
|
@ -1,7 +1,7 @@
|
||||
include ../vars.mk
|
||||
|
||||
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
|
||||
|
||||
@ -30,4 +30,5 @@ clean-objs:
|
||||
-rm -f *.o
|
||||
|
||||
install: $(BINS)
|
||||
install -D $(BINS)
|
||||
install -d $(SBINDIR)
|
||||
install -m 755 $(BINS) $(SBINDIR)
|
||||
|
12
doc/README
12
doc/README
@ -49,10 +49,14 @@ PLEASE NOTE THAT fakechroot or fakeroot-ng DO NOT WORK.
|
||||
HOW TO USE IT
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Before using xbps, some required utilities need to be built in the
|
||||
bin and lib directories. You can do this by issuing "make" in the top level
|
||||
directory and edit the configuration file located at the xbps directory.
|
||||
By default it uses the xbps directory in your $HOME.
|
||||
Before using xbps, some required utilities need to be built and installed
|
||||
into $(PREFIX); by default they are installed into /usr/local.
|
||||
You can do this by issuing "make" and "make install" as root in the top
|
||||
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
|
||||
-c flag, it will first try to use the default location at
|
||||
|
@ -16,6 +16,10 @@ $(LIBXBPS): sha256.o plist.o
|
||||
-ln -sf $(LIBXBPS_SO) $(LIBXBPS).$(MAJOR)
|
||||
-ln -sf $(LIBXBPS_SO) $(LIBXBPS)
|
||||
|
||||
install: $(LIBXBPS)
|
||||
install -d $(LIBDIR)
|
||||
install -m 644 $(LIBXBPS_SO) $(LIBDIR)
|
||||
|
||||
.PHONY: clean
|
||||
clean: clean-lib clean-objs
|
||||
|
||||
|
@ -207,7 +207,7 @@ check_installed_pkg()
|
||||
|
||||
iver="$($XBPS_REGPKGDB_CMD version $pkgname)"
|
||||
if [ -n "$iver" ]; then
|
||||
$XBPS_CMPVER_CMD $pkgname-$iver $pkgname-$reqver
|
||||
xbps-cmpver $pkgname-$iver $pkgname-$reqver
|
||||
[ $? -eq 0 ] && return 0
|
||||
fi
|
||||
|
||||
|
@ -122,6 +122,28 @@ rebuild_ldso_cache()
|
||||
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()
|
||||
{
|
||||
local action="$1"
|
||||
@ -135,6 +157,8 @@ xbps_chroot_handler()
|
||||
|
||||
rebuild_ldso_cache
|
||||
mount_chroot_fs
|
||||
install_xbps_utils
|
||||
|
||||
if [ "$action" = "chroot" ]; then
|
||||
env in_chroot=yes chroot $XBPS_MASTERDIR /bin/bash
|
||||
else
|
||||
|
@ -34,7 +34,7 @@ verify_sha256_cksum()
|
||||
|
||||
[ -z "$file" -o -z "$cksum" ] && return 1
|
||||
|
||||
filesum=$($XBPS_DIGEST_CMD $XBPS_SRCDISTDIR/$file)
|
||||
filesum=$(xbps-digest $XBPS_SRCDISTDIR/$file)
|
||||
if [ "$origsum" != "$filesum" ]; then
|
||||
msg_error "SHA256 checksum doesn't match for $file."
|
||||
fi
|
||||
|
2
vars.mk
2
vars.mk
@ -1,7 +1,7 @@
|
||||
# Common variables.
|
||||
|
||||
PREFIX ?= /usr/local
|
||||
BINDIR ?= $(PREFIX)/bin
|
||||
SBINDIR ?= $(PREFIX)/sbin
|
||||
LIBDIR ?= $(PREFIX)/lib
|
||||
|
||||
CPPFLAGS += -I../include
|
||||
|
@ -103,9 +103,6 @@ set_defvars()
|
||||
: ${XBPS_REGPKGDB_PATH:=$XBPS_CACHEDIR/regpkgdb.plist}
|
||||
: ${XBPS_PKGMETADIR:=$XBPS_CACHEDIR/metadata}
|
||||
: ${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"
|
||||
for i in ${DDIRS}; do
|
||||
@ -114,7 +111,7 @@ set_defvars()
|
||||
done
|
||||
|
||||
XBPS_REGPKGDB_CMD="env XBPS_REGPKGDB_PATH=$XBPS_REGPKGDB_PATH \
|
||||
$XBPS_REGPKGDB_CMD"
|
||||
xbps-pkgdb"
|
||||
}
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user