Skip to content
Permalink
Browse files

new portfile: ondir @0.2.3_0 (sysutils)

  • Loading branch information
ferdy authored and mf2k committed Jul 3, 2019
1 parent 9983c6a commit 414013e46d200b4d78501956421ac958c85d4cfa
Showing with 88 additions and 0 deletions.
  1. +52 −0 sysutils/ondir/Portfile
  2. +36 −0 sysutils/ondir/files/patch-Makefile.diff
@@ -0,0 +1,52 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0

name ondir
version 0.2.3
revision 0

categories sysutils
platforms darwin
license GPL-2

maintainers nomaintainer

description Automatic script execution on cd
long_description OnDir is a program that automatically executes scripts as you traverse directories at a terminal.

homepage https://swapoff.org/ondir.html
master_sites https://swapoff.org/files/ondir/

checksums rmd160 784dbfa4425ff8f9e9e1db28ae81c9b59471ebc1 \
sha256 504a677e5b7c47c907f478d00f52c8ea629f2bf0d9134ac2a3bf0bbe64157ba3 \
size 17820

patchfiles patch-Makefile.diff

post-patch {
reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/Makefile
}

use_configure no

build.target ondir

post-destroot {
set docdir ${prefix}/share/doc/${name}-${version}
xinstall -d ${destroot}${docdir}
xinstall -m 0644 -W ${worksrcpath} \
AUTHORS COPYING ChangeLog README.rst ondirrc.eg scripts.sh scripts.tcsh scripts.zsh TODO \
${destroot}${docdir}
}

notes "
${prefix}/share/doc/${name}-${version} contains docs and examples for fully configure ondir.
ondirrc.eg is a configuration example file; you can modify it and copy to ~/.ondirrc \
(per-user configuration) or to ${prefix}/etc/ondirrc (system-wide configuration).
Once you have installed OnDir, add either scripts.sh (for sh/bash), scripts.tcsh (for csh/tcsh) \
or scripts.zsh (for zsh) to your shell startup files. This will execute ondir whenever you change \
directories at the shell."
@@ -0,0 +1,36 @@
--- Makefile.orig 2019-06-27 19:33:59.000000000 +0200
+++ Makefile 2019-06-27 19:37:49.000000000 +0200
@@ -1,6 +1,6 @@
# Change these as you see fit
-PREFIX=/usr
-CONF=/etc/ondirrc
+PREFIX=@@PREFIX@@
+CONF=@@PREFIX@@/etc/ondirrc

SOURCES=conf.c ondir.c
HEADERS=conf.h ondir.h
@@ -15,20 +15,16 @@
# **WARNING** This is not recommended at all.

CC=cc
-CFLAGS=-O3 -DVERSION=\"$(VERSION)\" -DGLOBAL_CONF=\"$(CONF)\" -DUSE_ONENTERLEAVE
-CFLAGS=-Wall -c -g -DVERSION=\"$(VERSION)\" -DGLOBAL_CONF=\"$(CONF)\"
+CFLAGS=-O3 -Wall -DVERSION=\"$(VERSION)\" -DGLOBAL_CONF=\"$(CONF)\" -DUSE_ONENTERLEAVE
+# CFLAGS=-O3 -DVERSION=\"$(VERSION)\" -DGLOBAL_CONF=\"$(CONF)\" -DUSE_ONENTERLEAVE
+# CFLAGS=-Wall -c -g -DVERSION=\"$(VERSION)\" -DGLOBAL_CONF=\"$(CONF)\"

LD=cc
LDFLAGS=
-LDFLAGS=-g
+# LDFLAGS=-g

$(TARGET): $(OBJS)
$(LD) $(OBJS) $(LDFLAGS) -o $@
- @echo
- @echo "OnDir is built."
- @echo
- @echo "Type 'make DESTDIR=<pkg-root> install' to install."
- @echo

clean:
rm -f $(OBJS) $(TARGET)

0 comments on commit 414013e

Please sign in to comment.
You can’t perform that action at this time.