diff options
author | danfe <danfe@FreeBSD.org> | 2014-03-15 16:01:49 +0800 |
---|---|---|
committer | danfe <danfe@FreeBSD.org> | 2014-03-15 16:01:49 +0800 |
commit | 41b8d86412a61c5c70b1218894145d31a1fb7dc7 (patch) | |
tree | 6b7a36da54963ff976192afa67f974d3904b6eaa /sysutils/autojump | |
parent | 414851b757ea9ea527e898dc8f71044f021afff3 (diff) | |
download | freebsd-ports-gnome-41b8d86412a61c5c70b1218894145d31a1fb7dc7.tar.gz freebsd-ports-gnome-41b8d86412a61c5c70b1218894145d31a1fb7dc7.tar.zst freebsd-ports-gnome-41b8d86412a61c5c70b1218894145d31a1fb7dc7.zip |
- Sanitize and cleanup the port a bit: remove "Portname is ..." from COMMENT,
drop useless EXTRACT_SUFX, define LICENSE (GPLv3), sort the knobs, etc.
- Do not patch ./install.zsh file; it is nearly identical to ./install.sh
except for the _f file, which can be installed separately (do so)
- Stagify, use OPTIONS helpers, trim superfluous whitespace here and there
Diffstat (limited to 'sysutils/autojump')
-rw-r--r-- | sysutils/autojump/Makefile | 44 | ||||
-rw-r--r-- | sysutils/autojump/files/patch-install.sh | 11 | ||||
-rw-r--r-- | sysutils/autojump/files/patch-install.zsh | 65 | ||||
-rw-r--r-- | sysutils/autojump/pkg-deinstall | 12 | ||||
-rw-r--r-- | sysutils/autojump/pkg-message | 2 |
5 files changed, 35 insertions, 99 deletions
diff --git a/sysutils/autojump/Makefile b/sysutils/autojump/Makefile index e63ad619ab7c..31f7c44d2c4c 100644 --- a/sysutils/autojump/Makefile +++ b/sysutils/autojump/Makefile @@ -7,53 +7,45 @@ CATEGORIES= sysutils MASTER_SITES= http://cloud.github.com/downloads/joelthelion/autojump/ \ http://www.vermatech.com/distfiles/ DISTNAME= autojump_v${PORTVERSION} -EXTRACT_SUFX= .tar.gz MAINTAINER= neeraj.verma.ports@vermatech.com -COMMENT= Autojump is a tool that acts as a complement to cd +COMMENT= Tool that acts as a complement to cd -RUN_DEPENDS= ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash +LICENSE= GPLv3 -USE_PYTHON_RUN= YES +RUN_DEPENDS= bash:${PORTSDIR}/shells/bash -NO_BUILD= YES - -SUB_FILES+= pkg-install +NO_BUILD= yes +USE_PYTHON_RUN= yes +SUB_FILES= pkg-install PLIST_FILES= bin/autojump \ bin/jumpapplet \ + man/man1/autojump.1.gz \ share/autojump/autojump.bash \ share/autojump/autojump.zsh \ share/autojump/icon.png -MAN1= autojump.1 +PLIST_DIRS= share/autojump OPTIONS_DEFINE= ZSH OPTIONS_DEFAULT= ZSH -NO_STAGE= yes -.include <bsd.port.options.mk> +ZSH_RUN_DEPENDS= zsh:${PORTSDIR}/shells/zsh +ZSH_PLIST_FILES= share/zsh/site-functions/_j -.if ${PORT_OPTIONS:MZSH} -RUN_DEPENDS+= ${LOCALBASE}/bin/zsh:${PORTSDIR}/shells/zsh -PLIST_FILES+= share/zsh/site-functions/_j -.endif - -PLIST_DIRS= share/autojump +.include <bsd.port.options.mk> post-patch: - @${REINPLACE_CMD} 's|/usr/bin/python|${PYTHON_CMD}|' ${WRKSRC}/autojump - @${REINPLACE_CMD} -e 's|/usr$$|${PREFIX}|' -e 's|/usr/local|${PREFIX}|' -e 's|/bin/bash|${PREFIX}/bin/bash|' ${WRKSRC}/install.sh - @${REINPLACE_CMD} -e 's|/usr$$|${PREFIX}|' -e 's|/usr/local|${PREFIX}|' -e 's|/bin/zsh|${PREFIX}/bin/zsh|' ${WRKSRC}/install.zsh + @${REINPLACE_CMD} -e '/#!\/usr\/bin/s|python|env &|' \ + ${WRKSRC}/autojump do-install: + @(cd ${INSTALL_WRKSRC} && ${SETENV} ${SH} ./install.sh \ + --prefix ${STAGEDIR}${PREFIX}) .if ${PORT_OPTIONS:MZSH} - @(cd ${INSTALL_WRKSRC} && ${SETENV} PREFIX=${PREFIX} ./install.zsh ) -.else - @(cd ${INSTALL_WRKSRC} && ${SETENV} PREFIX=${PREFIX} ./install.sh ) + @${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions + ${INSTALL_DATA} ${WRKSRC}/_j \ + ${STAGEDIR}${PREFIX}/share/zsh/site-functions .endif - @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL - -post-install: - @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff --git a/sysutils/autojump/files/patch-install.sh b/sysutils/autojump/files/patch-install.sh index edac72766e16..5e3b68e60b94 100644 --- a/sysutils/autojump/files/patch-install.sh +++ b/sysutils/autojump/files/patch-install.sh @@ -1,6 +1,15 @@ --- ./install.sh.orig 2010-10-01 10:49:18.000000000 -0400 +++ ./install.sh 2011-12-03 23:04:22.000000000 -0500 -@@ -41,56 +41,12 @@ +@@ -15,7 +15,7 @@ + #You should have received a copy of the GNU General Public License + #along with autojump. If not, see <http://www.gnu.org/licenses/>. + +-function show_help { ++show_help() { + echo "sudo ./install.sh [--prefix /usr/local]" + } + +@@ -41,56 +41,12 @@ done echo "Installing to ${prefix} ..." # INSTALL AUTOJUMP diff --git a/sysutils/autojump/files/patch-install.zsh b/sysutils/autojump/files/patch-install.zsh deleted file mode 100644 index 6d07fd7d7a52..000000000000 --- a/sysutils/autojump/files/patch-install.zsh +++ /dev/null @@ -1,65 +0,0 @@ ---- ./install.zsh.orig 2010-10-01 10:49:18.000000000 -0400 -+++ ./install.zsh 2011-12-03 23:25:09.000000000 -0500 -@@ -39,19 +39,21 @@ - - echo "Installing main files to ${prefix} ..." - --sudo mkdir -p ${prefix}/share/autojump/ --sudo mkdir -p ${prefix}/bin/ --sudo mkdir -p ${prefix}/share/man/man1/ --sudo cp icon.png ${prefix}/share/autojump/ --sudo cp jumpapplet ${prefix}/bin/ --sudo cp autojump ${prefix}/bin/ --sudo cp autojump.1 ${prefix}/share/man/man1/ -+mkdir -p ${prefix}/share/autojump/ -+mkdir -p ${prefix}/bin/ -+mkdir -p ${prefix}/man/man1/ -+cp icon.png ${prefix}/share/autojump/ -+cp autojump.bash ${prefix}/share/autojump/ -+cp autojump.zsh ${prefix}/share/autojump/ -+cp jumpapplet ${prefix}/bin/ -+cp autojump ${prefix}/bin/ -+cp autojump.1 ${prefix}/man/man1/ - - # autocompletion file in the first directory of the FPATH variable - fail=true - for f in $fpath - do -- sudo cp _j $f && fail=false && break -+ cp _j $f && fail=false && break - done - if $fail - then -@@ -60,32 +60,3 @@ - else - echo "Installed autocompletion file to $f" - fi -- --if [ -d "/etc/profile.d" ]; then -- sudo cp autojump.zsh /etc/profile.d/ -- sudo cp autojump.sh /etc/profile.d/ -- echo "Remember to add the line" -- echo " source /etc/profile.d/autojump.zsh" -- echo "or" -- echo " source /etc/profile" -- echo "to your ~/.zshrc if it's not there already" -- echo -- echo "You need to source your ~/.zshrc (source ~/.zshrc) before you can start using autojump." --else -- echo "Your distribution does not have a /etc/profile.d directory, the default that we install one of the scripts to. Would you like us to copy it into your ~/.zshrc file to make it work? (If you have done this once before, delete the old version before doing it again.) [y/n]" -- read ans -- if [ ${#ans} -gt 0 ]; then -- if [ $ans = "y" -o $ans = "Y" -o $ans = "yes" -o $ans = "Yes" ]; then -- echo "" >> ~/.zshrc -- echo "#autojump" >> ~/.zshrc -- cat autojump.zsh >> ~/.zshrc -- echo "Done!" -- echo -- echo "You need to source your ~/.zshrc (source ~/.zshrc) before you can start using autojump." -- else -- echo "Then you need to put autojump.zsh, or the code from it, somewhere where it will get read. Good luck!" -- fi -- else -- echo "Then you need to put autojump.zsh, or the code from it, somewhere where it will get read. Good luck!" -- fi --fi diff --git a/sysutils/autojump/pkg-deinstall b/sysutils/autojump/pkg-deinstall index 7be2b4c4ef7b..03d9c8fafad8 100644 --- a/sysutils/autojump/pkg-deinstall +++ b/sysutils/autojump/pkg-deinstall @@ -5,11 +5,11 @@ POST-DEINSTALL) rm -f /etc/profile.autojump rm -f /etc/zshrc.autojump # delete the source (.) line from the /etc/profile and /etc/zshrc - if [ -f /etc/profile ] ; then - sed -i '' -e '/profile.autojump/d' /etc/profile - fi - if [ -f /etc/zshrc ] ; then - sed -i '' -e '/zshrc.autojump/d' /etc/zshrc - fi + if [ -f /etc/profile ] ; then + sed -i '' -e '/profile.autojump/d' /etc/profile + fi + if [ -f /etc/zshrc ] ; then + sed -i '' -e '/zshrc.autojump/d' /etc/zshrc + fi ;; esac diff --git a/sysutils/autojump/pkg-message b/sysutils/autojump/pkg-message index 0c5629d0ebf2..651d03afefe1 100644 --- a/sysutils/autojump/pkg-message +++ b/sysutils/autojump/pkg-message @@ -2,5 +2,5 @@ * AutoJump installed ************************************************************** * Note: Your /etc/profile was changed for this installation. -* changes will be reverted when you un-install the package. +* changes will be reverted when you un-install the package. ************************************************************** |