Browse Source

Avoid hard-coded paths in some more places

The plan is to allow other apps to build packages by changing the
prefix.
android-5
Fredrik Fornwall 7 years ago
parent
commit
6eeaf55131
  1. 4
      packages/apt/build.sh
  2. 4
      packages/cowsay/install.sh.patch
  3. 6
      packages/mpd/mpdconf.example.patch
  4. 2
      packages/multitail/Makefile.patch
  5. 2
      packages/openssh/source-ssh-agent.sh

4
packages/apt/build.sh

@ -35,6 +35,6 @@ lib/libapt-inst.so
termux_step_post_make_install() { termux_step_post_make_install() {
printf "# The main termux repository:\ndeb [arch=all,${TERMUX_ARCH}] https://termux.net stable main\n" > $TERMUX_PREFIX/etc/apt/sources.list printf "# The main termux repository:\ndeb [arch=all,${TERMUX_ARCH}] https://termux.net stable main\n" > $TERMUX_PREFIX/etc/apt/sources.list
cp $TERMUX_PKG_BUILDER_DIR/trusted.gpg $TERMUX_PREFIX/etc/apt/ cp $TERMUX_PKG_BUILDER_DIR/trusted.gpg $TERMUX_PREFIX/etc/apt/
rm /data/data/com.termux/files/usr/include/apt-pkg -r rm $TERMUX_PREFIX/include/apt-pkg -r
} }

4
packages/cowsay/install.sh.patch

@ -55,8 +55,8 @@ diff -u -r ../cowsay-3.03+dfsg1/install.sh ./install.sh
-fi -fi
- -
-PREFIX=${prefix:-/usr/local} -PREFIX=${prefix:-/usr/local}
+usethisperl=/data/data/com.termux/files/usr/bin/perl +usethisperl=@TERMUX_PREFIX@/bin/perl
+PREFIX=/data/data/com.termux/files/usr +PREFIX=@TERMUX_PREFIX@
echo Okay, time to install this puppy. echo Okay, time to install this puppy.

6
packages/mpd/mpdconf.example.patch

@ -1,4 +1,4 @@
--- /data/data/com.termux/files/home/MPD-0.20.8.old/doc/mpdconf.example 2017-07-18 12:54:14.570036043 +0200 --- ./doc/mpdconf.example 2017-07-18 12:54:14.570036043 +0200
+++ ./doc/mpdconf.example 2017-07-18 12:56:34.270035990 +0200 +++ ./doc/mpdconf.example 2017-07-18 12:56:34.270035990 +0200
@@ -10,14 +10,14 @@ @@ -10,14 +10,14 @@
# be disabled and audio files will only be accepted over ipc socket (using # be disabled and audio files will only be accepted over ipc socket (using
@ -31,7 +31,7 @@
# setting defaults to logging to syslog, otherwise logging is disabled. # setting defaults to logging to syslog, otherwise logging is disabled.
# #
-#log_file "~/.mpd/log" -#log_file "~/.mpd/log"
+#log_file "/data/data/com.termux/files/home/.mpd/log" +#log_file "@TERMUX_HOME@/.mpd/log"
# #
# This setting sets the location of the file which stores the process ID # This setting sets the location of the file which stores the process ID
# for use of mpd --kill and some init scripts. This setting is disabled by # for use of mpd --kill and some init scripts. This setting is disabled by
@ -68,7 +68,7 @@
# #
# And for Unix Socket # And for Unix Socket
-#bind_to_address "~/.mpd/socket" -#bind_to_address "~/.mpd/socket"
+bind_to_address "/data/data/com.termux/files/usr/tmp/mpd.socket" +bind_to_address "@TERMUX_PREFIX@/tmp/mpd.socket"
# #
# This setting is the TCP port that is desired for the daemon to get assigned # This setting is the TCP port that is desired for the daemon to get assigned
-# to. -# to.

2
packages/multitail/Makefile.patch

@ -7,7 +7,7 @@ diff -u -r ../multitail-6.4.1/Makefile ./Makefile
UTF8_SUPPORT=yes UTF8_SUPPORT=yes
-DESTDIR= -DESTDIR=
-PREFIX=/usr -PREFIX=/usr
+DESTDIR=/data/data/com.termux/files/usr +DESTDIR=@TERMUX_PREFIX@
+PREFIX= +PREFIX=
CONFIG_FILE=$(DESTDIR)/etc/multitail.conf CONFIG_FILE=$(DESTDIR)/etc/multitail.conf

2
packages/openssh/source-ssh-agent.sh

@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/sh #!/bin/sh
# source-ssh-agent: Script to source for ssh-agent to work. # source-ssh-agent: Script to source for ssh-agent to work.
# Check if accidentaly executed instead of sourced: # Check if accidentaly executed instead of sourced:

Loading…
Cancel
Save