Commit 2df19eba authored by lyxell's avatar lyxell Committed by GitHub

Merge pull request #847 from uberhacker/fix-mandb-apropos

Fix mandb to get apropos working
parents c2cf6792 490019a6
...@@ -3,7 +3,7 @@ require 'package' ...@@ -3,7 +3,7 @@ require 'package'
class Mandb < Package class Mandb < Package
description 'mandb is used to initialise or manually update index database caches that are usually maintained by man.' description 'mandb is used to initialise or manually update index database caches that are usually maintained by man.'
homepage 'http://savannah.nongnu.org/projects/man-db' homepage 'http://savannah.nongnu.org/projects/man-db'
version '2.7.6.1' version '2.7.6.1-1'
source_url 'http://download.savannah.gnu.org/releases/man-db/man-db-2.7.6.1.tar.xz' source_url 'http://download.savannah.gnu.org/releases/man-db/man-db-2.7.6.1.tar.xz'
source_sha256 '08edbc52f24aca3eebac429b5444efd48b9b90b9b84ca0ed5507e5c13ed10f3f' source_sha256 '08edbc52f24aca3eebac429b5444efd48b9b90b9b84ca0ed5507e5c13ed10f3f'
...@@ -24,12 +24,30 @@ class Mandb < Package ...@@ -24,12 +24,30 @@ class Mandb < Package
end end
def self.install def self.install
system "mkdir -p #{CREW_DEST_DIR}/usr/local/cache/man"
system "sed -i 's,/var/cache/man,/usr/local/cache/man,g' include/manconfig.h.in"
system "sed -i 's,/var/cache/man,/usr/local/cache/man,g' src/manp.c"
system "sed -i 's,/var/cache/man,/usr/local/cache/man,g' src/tests/mandb-7"
system "sed -i 's,/var/cache/man,/usr/local/cache/man,g' src/man_db.conf.in"
system "sed -i 's,/var/cache/man,/usr/local/cache/man,g' init/systemd/man-db.conf"
system "sed -i 's,/var/cache/man,/usr/local/cache/man,g' manual/db.me"
system "sed -i 's,/var/cache/man,/usr/local/cache/man,g' manual/files.me"
system "sed -i 's,/var/cache/man,/usr/local/cache/man,g' man/man1/whatis.man1"
system "sed -i 's,/var/cache/man,/usr/local/cache/man,g' man/man1/apropos.man1"
system "sed -i 's,/var/cache/man,/usr/local/cache/man,g' man/man1/man.man1"
system "sed -i 's,/var/cache/man,/usr/local/cache/man,g' man/man8/accessdb.man8"
system "sed -i 's,/var/cache/man,/usr/local/cache/man,g' man/man8/mandb.man8"
system "sed -i 's,/usr/share/man,/usr/local/share/man,g' tools/chconfig"
system "sed -i 's,/var/cache/man,/usr/local/cache/man,g' tools/chconfig"
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install" system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
puts "" puts ""
puts "You will have to change the default PAGER environment variable to be able to use mandb:" puts "You will have to change the default PAGER environment variable to be able to use mandb:".lightblue
puts "echo \"export PAGER=/usr/local/bin/less\" >> ~/.bashrc && . ~/.bashrc" puts "echo \"export PAGER=/usr/local/bin/less\" >> ~/.bashrc && . ~/.bashrc".lightblue
puts ""
puts "You will also have to set the MANPATH environment variable:".lightblue
puts "echo \"export MANPATH=/usr/local/man:$MANPATH\" >> ~/.bashrc && . ~/.bashrc".lightblue
puts ""
puts "To create the man databases and get apropos working, type 'mandb -c'.".lightblue
puts "" puts ""
puts "You will also have to set the MANPATH environment variable:"
puts "echo \"export MANPATH=/usr/local/man:$MANPATH\" >> ~/.bashrc && . ~/.bashrc"
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment