Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add formula unar #16276

Closed
wants to merge 1 commit into from

4 participants

@jaimeMF

This formula installs unar and lsar, the first one can extract archives with different formats and the last one list the contents of an archive.

It was already posted on #15322, but while updating to 1.4 I messed it.

@adamv adamv referenced this pull request
Closed

New formula unar #16945

@jaimeMF

Now libXADMaster.a and XADMaster.framework are also installed.

@jacknagel
Owner

It would be nice if upstream provided a cleaner method of installing this software.

@jaimeMF

What do you mean, a Makefile?
Installing and building XADFramework can be removed, so it would just build and install lsar and unar.

@chdiza

I have made my own formula for this and have been using it for some time without any problem. The best way to do it is to download the pre-built "legacy" versions (which, despite the name, work 100% fine on 10.8.3 and Lion)---these legacy versions are simply de-sandboxified forms of what's on the App Store, and are required for running unar and lsar on Snow Leo and below.

In short, the Legacy versions work for everybody, the non-Legacy just for 10.7 and 10.8.

My formula may be viewed here: https://gist.github.com/chdiza/5376186

@jaimeMF

@chdiza it's a good idea, but some people may want to build from source, also you can install the manpages and the bash completion scripts, which are useful.

@jaimeMF jaimeMF Add formula unar
This formula installs unar and lsar, the first one can extract archives with different formats and the last one list the contents of an archive.
8a1f1fe
@jaimeMF

I've updated to 1.6.
@jacknagel If you prefer to use a Makefile, I can adapt one of the provided makefiles and then post it upstream.

@adamv
Owner

I'm going to pull this, with minor edits. Only thing I'm not sure of is where the Framework should be copied to.

Also, should the headers be symlinked form the Framework instead of copied?

@adamv adamv closed this pull request from a commit
@jaimeMF jaimeMF unar 1.6
Closes #16276.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
9ab758b
@adamv adamv closed this in 9ab758b
@jaimeMF

Well, I don't know where frameworks are usually put, and I think there wouldn't be any problem if the headers are symlinked.
I personally don't use the framework, I'm just interested in the programs, so if you prefer not to install it, I have no problem.

@jaimeMF jaimeMF deleted the jaimeMF:unar branch
@lovelace lovelace referenced this pull request from a commit
@jaimeMF jaimeMF unar 1.6
Closes #16276.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
0f01389
@handyman5 handyman5 referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@draftycode draftycode referenced this pull request from a commit in draftycode/homebrew
@jaimeMF jaimeMF unar 1.6
Closes #16276.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
92d14b7
@shelhamer shelhamer referenced this pull request from a commit
@jaimeMF jaimeMF unar 1.6
Closes #16276.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
dff5e2f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 13, 2013
  1. @jaimeMF

    Add formula unar

    jaimeMF authored jaimeMF committed
    This formula installs unar and lsar, the first one can extract archives with different formats and the last one list the contents of an archive.
This page is out of date. Refresh to see the latest.
Showing with 34 additions and 0 deletions.
  1. +34 −0 Library/Formula/unar.rb
View
34 Library/Formula/unar.rb
@@ -0,0 +1,34 @@
+require 'formula'
+
+class Unar < Formula
+ homepage 'http://unarchiver.c3.cx/commandline'
+ url 'http://theunarchiver.googlecode.com/files/unar1.6_src.zip'
+ version '1.6'
+ sha1 '1cee2ea4bd89feff4f84754858b21f3757404d7c'
+ head 'https://code.google.com/p/theunarchiver/' , :using => :hg
+
+ depends_on :xcode
+
+ def install
+ if not build.include? "HEAD"
+ #The folders are moved into a folder called The Unarchiver
+ #We must move to it
+ #When the source is dowloaded from hg there is no problem
+ cd "./The Unarchiver"
+ end
+ #Build XADMaster.framework:
+ system "xcodebuild -project ./XADMaster/XADMaster.xcodeproj -target XADMaster SYMROOT=../ -configuration Release"
+ #Build unar and lsar
+ system "xcodebuild -project ./XADMaster/XADMaster.xcodeproj -target unar SYMROOT=../ -configuration Release"
+ system "xcodebuild -project ./XADMaster/XADMaster.xcodeproj -target lsar SYMROOT=../ -configuration Release"
+ bin.install "./Release/unar", "./Release/lsar"
+ include.mkpath
+ mkdir "#{include}/libXADMaster/"
+ copy Dir["./Release/XADMaster.framework/Headers/*"], "#{include}/libXADMaster/"
+ lib.install "./Release/libXADMaster.a" , "./Release/XADMaster.framework"
+ cd "./Extra" do
+ man1.install "lsar.1", "unar.1"
+ (prefix+'etc/bash_completion.d').install "unar.bash_completion", "lsar.bash_completion"
+ end
+ end
+end
Something went wrong with that request. Please try again.