Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

hardlink: Add formula for 0.2.0 & 0.3.0_rc1 #18599

Closed
wants to merge 3 commits into from

5 participants

@elskwid

Add formula for the hardlink project from http://jak-linux.org/projects/hardlink/.

Hardlink replaces multiple copies of a file with hardlinks. This formula includes both the stable and experimental versions.

References:

A previous pull request was opened for the Python version but was closed in favor of a formula for the C version. #12068

There is also a pull request that was meant to let OS X users create actual hardlinks. #17134.

:star:
And big thanks to @phlipper for all his help with the spelunking needed to get this working and sticking with me through thick and thin.

@elskwid elskwid hardlink: Add formula for 0.2.0 & 0.3.0_rc1
Add formula for the hardlink project from
http://jak-linux.org/projects/hardlink/.

Hardlink replaces multiple copies of a file with
hardlinks. This formula includes both the stable
and experimental versions.

A previous pull request was opened for the Python
version but was closed in favor of a formula
for the C version. 

Homebrew#12068
8859c90
@phlipper

@elskwid this is one heck of an effort, nice job :older_man:

@adamv
Owner

Does this really need a devel version?

@elskwid

@adamv - Good question. The developer has changed the dependencies in the experimental/dev version and these changes may be desired by the installing user. The formula definition supports it and it was trivial to add so I put it in. The Formula Cookbook doesn't really go over when you might want to use this support and when you might leave it out.

So that I may learn:

What are the tradeoffs for including a dev version? (My guess is maintenance)
When would be a good time to include one?

Library/Formula/hardlink.rb
((9 lines not shown))
+ version "0.3.0_rc1" # version name from the repo tag name
+ url "http://jak-linux.org/projects/hardlink/hardlink_0.3.0~rc1.tar.gz"
+ sha1 "d1aa941e2fba0173cef10f5abdc8db763eac0474"
+ end
+
+ depends_on "pkg-config" => :build
+ depends_on "gnu-getopt" => :build
+ depends_on "pcre" => :build
+
+ def install
+ system "make", "PREFIX=#{prefix}", "MANDIR=#{man}", "BINDIR=#{bin}",
+ "install"
+ end
+
+ test do
+ system "hardlink", "--help"
@jacknagel Owner

Use the full path to the executable; #{bin}/hardlink

@elskwid
elskwid added a note

@jacknagel, thanks for the feedback! I've added the full path in f592e59.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Library/Formula/hardlink.rb
((1 lines not shown))
+require "formula"
+
+class Hardlink < Formula
+ homepage "http://jak-linux.org/projects/hardlink/"
+ url "http://jak-linux.org/projects/hardlink/hardlink_0.2.0.tar.gz"
+ sha1 "6ba0fe26bbdf4feac6483550f647b4424e614cb9"
+
+ devel do
+ version "0.3.0_rc1" # version name from the repo tag name
+ url "http://jak-linux.org/projects/hardlink/hardlink_0.3.0~rc1.tar.gz"
+ sha1 "d1aa941e2fba0173cef10f5abdc8db763eac0474"
+ end
+
+ depends_on "pkg-config" => :build
+ depends_on "gnu-getopt" => :build
+ depends_on "pcre" => :build
@jacknagel Owner

Are getopt and pcre really build-time deps?

@elskwid
elskwid added a note

Hi @jacknagel,

I believe they are. Here's a reference to pcre in the Makefile. And the usage of getopt is here.

While the author does provide a noop alternative I wanted to support the full long option names. If there are other ways to achieve this I'm happy to modify the formula. I will admit to having done this the hard way first, then looking at other recipes to find the best way to list the dependencies.

@jacknagel Owner

"build-time" means only build-time, these are runtime deps also.

@elskwid
elskwid added a note

Ahhh, now I see the nature of your question. I will make the necessary changes. Thank you for the clarification!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@adamv
Owner

Ping.

@adamv
Owner

Any update here?

@elskwid elskwid Correct dependencies
`getopt` and `pcre` are runtime dependencies.
d6b3d62
@elskwid

@adamv - Sorry about the delay. I believe d6b3d62 resolves the dependency issue.

@adamv adamv closed this pull request from a commit
@elskwid elskwid hardlink 0.2.0
Closes #18599.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
9ab0d4c
@adamv adamv closed this in 9ab0d4c
@yriveiro yriveiro referenced this pull request from a commit
@elskwid elskwid hardlink 0.2.0
Closes #18599.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
41a3a3c
@nddrylliog nddrylliog referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@handyman5 handyman5 referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@shelhamer shelhamer referenced this pull request from a commit
@elskwid elskwid hardlink 0.2.0
Closes #18599.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
30c491b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 20, 2013
  1. @elskwid

    hardlink: Add formula for 0.2.0 & 0.3.0_rc1

    elskwid authored
    Add formula for the hardlink project from
    http://jak-linux.org/projects/hardlink/.
    
    Hardlink replaces multiple copies of a file with
    hardlinks. This formula includes both the stable
    and experimental versions.
    
    A previous pull request was opened for the Python
    version but was closed in favor of a formula
    for the C version. 
    
    Homebrew#12068
Commits on Mar 26, 2013
  1. @elskwid
Commits on May 16, 2013
  1. @elskwid

    Correct dependencies

    elskwid authored
    `getopt` and `pcre` are runtime dependencies.
This page is out of date. Refresh to see the latest.
Showing with 26 additions and 0 deletions.
  1. +26 −0 Library/Formula/hardlink.rb
View
26 Library/Formula/hardlink.rb
@@ -0,0 +1,26 @@
+require "formula"
+
+class Hardlink < Formula
+ homepage "http://jak-linux.org/projects/hardlink/"
+ url "http://jak-linux.org/projects/hardlink/hardlink_0.2.0.tar.gz"
+ sha1 "6ba0fe26bbdf4feac6483550f647b4424e614cb9"
+
+ devel do
+ version "0.3.0_rc1" # version name from the repo tag name
+ url "http://jak-linux.org/projects/hardlink/hardlink_0.3.0~rc1.tar.gz"
+ sha1 "d1aa941e2fba0173cef10f5abdc8db763eac0474"
+ end
+
+ depends_on "pkg-config" => :build
+ depends_on "gnu-getopt"
+ depends_on "pcre"
+
+ def install
+ system "make", "PREFIX=#{prefix}", "MANDIR=#{man}", "BINDIR=#{bin}",
+ "install"
+ end
+
+ test do
+ system "#{bin}/hardlink", "--help"
+ end
+end
Something went wrong with that request. Please try again.