mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
Added recipe
This commit is contained in:
63
app-shells/command_not_found/command_not_found-0.0.1.recipe
Normal file
63
app-shells/command_not_found/command_not_found-0.0.1.recipe
Normal file
@@ -0,0 +1,63 @@
|
||||
SUMMARY="Command-not-found program"
|
||||
DESCRIPTION="
|
||||
Command-not-found hooks into the command_not_found_handle
|
||||
to inform end users where to find an application if they don't have it.
|
||||
It can also check for typos (a feature of zsh)
|
||||
"
|
||||
HOMEPAGE="https://github.com/jrabbit-cnf/"
|
||||
SRC_URI="git+https://github.com/jrabbit/haiku-cnf.git#87cd5d0c212e377cffa5d3e2a00c143fe751c6fb"
|
||||
ARCHITECTURES="x86 x86_gcc2"
|
||||
REVISION="1"
|
||||
DISABLE_SOURCE_PACKAGE="yes"
|
||||
|
||||
LICENSE="GNU GPL v2"
|
||||
COPYRIGHT="(c) 2011 Jrabbit"
|
||||
|
||||
PROVIDES="
|
||||
command_not_found = $portVersion
|
||||
cmd:command_not_found = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku >= $haikuVersion
|
||||
cmd:python
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
cmd:python
|
||||
"
|
||||
POST_INSTALL_SCRIPTS="
|
||||
boot/post-install/options.sh
|
||||
"
|
||||
INSTALL()
|
||||
{
|
||||
#Unfortunately- we can't use install_cnf.py as it uses the old dir structure"
|
||||
|
||||
mkdir -p $dataDir/profile.d
|
||||
cat << EOF >> $dataDir/profile.d/command_not_found.sh
|
||||
#!/bin/bash
|
||||
if [ -e /boot/common/bin/python ]; then
|
||||
command_not_found_handle() {
|
||||
/bin/env python /bin/command_not_found "\$1"
|
||||
}
|
||||
else
|
||||
command_not_found_handle() {
|
||||
echo "\$1 not found: try installoptionalpkg \$1; and check installoptionalpkg -l"
|
||||
}
|
||||
fi
|
||||
EOF
|
||||
chmod 0777 $dataDir/profile.d/command_not_found.sh
|
||||
|
||||
mkdir -p $postInstallDir
|
||||
cat << EOF >> $postInstallDir/options.sh
|
||||
mkdir -p ~/config/settings/command-not-found/
|
||||
cat << EOT >> ~/config/settings/command-not-found/options.json
|
||||
{
|
||||
"autocorrect": false,
|
||||
"spellcheck": false,
|
||||
"haikuports": false
|
||||
}
|
||||
EOT
|
||||
EOF
|
||||
|
||||
mkdir -p $binDir
|
||||
install -m 0755 haiku_cnf.py $binDir/command_not_found
|
||||
}
|
||||
Reference in New Issue
Block a user