sift icon indicating copy to clipboard operation
sift copied to clipboard

Request: support major package management systems such as macports and apt

Open esafak opened this issue 10 years ago • 14 comments
trafficstars

It would be nice if you or anyone reading this could add support for macports or homebrew, as well as package systems for the other operating systems. This would help popularize the tool.

esafak avatar Sep 15 '15 23:09 esafak

I will try to get sift added to major distributions/package systems - this issue can be used to document efforts:

svent avatar Sep 16 '15 22:09 svent

sift would be easy to be supported in other package systems. You will need only to copy a binary file from http://sift-tool.org/download.html. One great advantage from Go.

@svent: By the way, I have created two sift Arch Linux packages: sift and sift-bin. The former build sift from source and the latter download sift binary from http://sift-tool.org/download.html. I can imagine both kind of users: one want to build from source and another just want to download a binary.

jetm avatar Sep 16 '15 22:09 jetm

@jetm the pkgbuild for sift (not the bin version) needs a little bit to make it work.

adding to the build() function after the cd line:

export GOPATH="$srcdir" go get github.com/svent/go-flags go get github.com/svent/go-nbreader

Will let it compile completely, oh and git may need to be added to depends. (go uses git and such to fetch stuff)

professorjamesmoriarty avatar Sep 23 '15 12:09 professorjamesmoriarty

@shaggytwodope: Thank you for report it. It has been fixed.

For me works fine because in the past I have installed Go and followed package instructions:

mkdir ~/go
export GOPATH=~/go
export PATH=$PATH:~/go/bin

jetm avatar Sep 23 '15 13:09 jetm

@jetm well the catch here is exporting the go path (even some users set this in their env already) might cause some aur stuff to build for folks. But we gotta always assume go isnt even installed and nothing is setup. (took me a long time with people bitching at me to get this right lol)

But much love, need any aur help hit me up.

professorjamesmoriarty avatar Sep 23 '15 13:09 professorjamesmoriarty

Is anyone working on homebrew? If not, I can add it.

mwean avatar Sep 23 '15 20:09 mwean

@mwean I do not know of anyone working on it yet, and unfortunately I do not have a test device at the moment.

svent avatar Sep 23 '15 20:09 svent

I made a PR for it here: homebrew/homebrew#44293. It should get merged in soon.

mwean avatar Sep 23 '15 23:09 mwean

I'm having a problem building the binary. It works the first time, but if I delete the binary and try to build again, I get these errors:

$ go build -o sift
./sift.go:474: too many arguments in call to parser.AddGroup
./sift.go:475: parser.Name undefined (type *flags.Parser has no field or method Name)

It works again if I delete the go-flags directory. Do you have any idea why that might be happening?

mwean avatar Sep 24 '15 00:09 mwean

@mwean Thanks for your work to get sift available in homebrew! I will merge your PR once the PR for homebrew gets merged.

Regarding the build errors: I think the following line from the homebrew formula might be the problem: url "https://github.com/svent/go-flags.git", :revision => "37c8226983775d404b6edfebd44be1078bd0fe95" The referenced commit is quite old and the API of that release differs from the current release (the two error messages match this). It should not be necessary to reference specific commits - the current version of the go-flags fork and go-nbreader will always work with the current version of sift.

svent avatar Sep 24 '15 21:09 svent

Oh great, I think that fixed it! I was using the sha from the last release instead of the latest commit. I think they want the revision to lock the version of all dependencies.

mwean avatar Sep 24 '15 21:09 mwean

I created a macports ticket.

esafak avatar Sep 24 '15 21:09 esafak

Ok, it's finally on homebrew

mwean avatar Oct 16 '15 16:10 mwean

That's great to hear, thanks for you support on this! I just merged your PR regarding the installation options.

svent avatar Oct 16 '15 23:10 svent