]> gitweb.fluxo.info Git - trashman.git/commitdiff
Fix: xbps: hoarder and trashman installs
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 16 Aug 2020 11:49:42 +0000 (08:49 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 16 Aug 2020 11:49:42 +0000 (08:49 -0300)
share/hoarder/xbps/unix/linux/debian/install
share/trashman/trashman/unix/install
share/trashman/xbps/info [new file with mode: 0644]
share/trashman/xbps/unix/linux/debian/install [new file with mode: 0755]

index 4652ad15b5b23326bd76cfb2a337c3dd4f0e37e5..a6fc2562b7feae4eefa342d7a57f3a07fd946f3b 100755 (executable)
@@ -2,6 +2,7 @@
 #
 # Install XBPS package manager.
 #
+
 # Parameters
 SHARE="$1"
 LIB="$2"
@@ -19,11 +20,11 @@ trashman_apt_install make gcc zlib1g-dev pkg-config libarchive-dev graphviz doxy
 mkdir -p $HOME/.local/src
 
 # Build and install
-git clone https://github.com/void-linux/xbps $HOME/.local/src/xbps || exit 1
-cd $HOME/.local/src/xbps                                           || exit 1
-./configure --enable-rpath --prefix=/usr --sysconfdir=/etc         || exit 1
-make -j$(nproc)                                                    || exit 1
-make DESTDIR=$DESTDIR install clean                                || exit 1
+git clone https://github.com/void-linux/xbps $HOME/.local/src/xbps     || exit 1
+cd $HOME/.local/src/xbps                                               || exit 1
+./configure --enable-rpath --prefix=$DESTDIR --sysconfdir=$DESTDIR/etc || exit 1
+make -j$(nproc)                                                        || exit 1
+make DESTDIR=$DESTDIR install clean                                    || exit 1
 
 # Remove source
 #rm -rf $HOME/.local/src/xbps
index 7e0991124140a582fddeafc731f59cf4df1649ac..f8825afa89b475a30a03a6530b3c6194fdce30e0 100755 (executable)
@@ -6,7 +6,7 @@
 # Parameters
 SHARE="$1"
 BASE="$SHARE/../.."
-FOLDER="/usr/local"
+DESTDIR="/usr/local"
 
 # Include basic functions
 . $SHARE/trashman/functions || exit 1
@@ -18,14 +18,14 @@ if ! which rsync > /dev/null 2>&1; then
 fi
 
 # Ensure folders exists and we have their absolute names
-FOLDER="`mkdir -p $FOLDER && cd $FOLDER > /dev/null && pwd`"
+DESTDIR="`mkdir -p $DESTDIR && cd $DESTDIR > /dev/null && pwd`"
 BASE="`cd $BASE > /dev/null && pwd`"
 
 # Install if we're not already running the system-wide version
-if [ "$BASE" != "$FOLDER" ]; then
-  rsync -av --delete $BASE/ $FOLDER/share/trashman/ || exit 1
+if [ "$BASE" != "$DESTDIR" ]; then
+  rsync -av --delete $BASE/ $DESTDIR/share/trashman/ || exit 1
 fi
 
 # Create symlink
-( cd $FOLDER/bin && ln -sf $FOLDER/share/trashman/trashman ) || exit 1
-( cd $FOLDER/bin && ln -sf $FOLDER/share/trashman/hoarder  ) || exit 1
+( cd $DESTDIR/bin && ln -sf $DESTDIR/share/trashman/trashman ) || exit 1
+( cd $DESTDIR/bin && ln -sf $DESTDIR/share/trashman/hoarder  ) || exit 1
diff --git a/share/trashman/xbps/info b/share/trashman/xbps/info
new file mode 100644 (file)
index 0000000..50a56ed
--- /dev/null
@@ -0,0 +1 @@
+X Binary Package System designed and implemented from scratch
diff --git a/share/trashman/xbps/unix/linux/debian/install b/share/trashman/xbps/unix/linux/debian/install
new file mode 100755 (executable)
index 0000000..dfc4423
--- /dev/null
@@ -0,0 +1,30 @@
+#!/usr/bin/env sh
+#
+# Install XBPS package manager.
+#
+
+# Parameters
+SHARE="$1"
+BASE="$SHARE/../.."
+DESTDIR="/usr/local"
+
+# Include basic functions
+. $SHARE/trashman/functions || exit 1
+. $SHARE/trashman/debian    || exit 1
+
+# Requirements
+trashman_apt_install make gcc zlib1g-dev pkg-config libarchive-dev graphviz doxygen
+#trashman_apt_install atf-sh
+
+# Source folder
+mkdir -p $DESTDIR/src
+
+# Build and install
+git clone https://github.com/void-linux/xbps $DESTDIR/src/xbps         || exit 1
+cd $HOME/.local/src/xbps                                               || exit 1
+./configure --enable-rpath --prefix=$DESTDIR --sysconfdir=$DESTDIR/etc || exit 1
+make -j$(nproc)                                                        || exit 1
+make DESTDIR=$DESTDIR install clean                                    || exit 1
+
+# Remove source
+#rm -rf $HOME/.local/src/xbps