mcrapet / plowshare

Command-line tool and engine for managing sharing websites
GNU General Public License v3.0
847 stars 88 forks source link

adds homebrew method for OS X #46

Closed pyed closed 8 years ago

mcrapet commented 8 years ago

Hi,

The plowshare homebrew recipe appears quite old. tesseract has been dropped since july, 2012!

I think we should first improve the recipe rather than plowshare INSTALL file. I'll add the simple: $ homebrew plowshare line when recipe will be fixed.

Could you test this: http://sprunge.us/cXhU What is the bottle bloc ?

pyed commented 8 years ago

your formula works just switch GNU_SED=/opt/bin/gnu-sed for GNU_SED=/usr/local/bin/gsed

the bottle block contains info for the "bottled" version of the formula, which is just a pre-compiled binary for the last 3 OS X versions, and what you see here is the checksums, it should be left for the home-brew guys.

mcrapet commented 8 years ago

Thanks for testing :)

Is there a special variable for /usr/local/bin like #{bindir} ?

mcrapet commented 8 years ago

According to other recipes, it appears to be #{bin}

mcrapet commented 8 years ago

@pyed Is this okay for you ? http://sprunge.us/VVEF

If so, I'll send them a PR.

pyed commented 8 years ago

this #{bin}/gsed expands to /usr/local/Cellar/plowshare/2.1.4/bin/gsed which is wrong

I couldn't find a resource for all the variables, I'll keep looking

pyed commented 8 years ago

"GNU_SED=#{HOMEBREW_PREFIX}/bin/gsed" works

I've seen some formulas use it

mcrapet commented 8 years ago

https://github.com/Homebrew/homebrew-core/pull/1196

I bypassed this:

pyed commented 8 years ago

brew audit --strict --online plowshare complains about not having a test block.

here's a test block from wget's formula

test do
    system bin/"wget", "-O", "-", "https://google.com"
end

what kind of test is suitable for plowshare ?

pyed commented 8 years ago

after looking at wget's formula test block, looks like we just needed GNU_SED=bin/gsed

mcrapet commented 8 years ago

A guy commented PR.

Could you test (for the last time I hope): https://raw.githubusercontent.com/mcrapet/homebrew-core/64a04bb78b359c34638087e5c4cd74a59517f050/Formula/plowshare.rb

pyed commented 8 years ago

yes, that works, it should be the right way to do it.

mcrapet commented 8 years ago

PR has been accepted. I'll update INSTALL. Thanks for your help.