You are not logged in.

#1 2021-06-03 22:29:00

Kanehekili
Member
Registered: 2018-07-28
Posts: 12

Added Videocut to AUR. Would need advice if correctly packaged

Hi,
I've been working on a fast video cutter for some time and decided to add it to the AUR.  Besides some python code it contains a binary which has been created by my build process in order to keep the dependencies down.
Could someone look over the PKBUILD and verify that I did not break any rules? The package is called "videocut". It is based on opencv (for display) and ffmpeg (for cutting).
Thanks for your help
Kanehekili

Offline

#2 2021-06-03 22:43:53

loqs
Member
Registered: 2014-03-06
Posts: 17,327

Re: Added Videocut to AUR. Would need advice if correctly packaged

license=('GPL 2')

No space see PKGBUILD#license.

Why the install file.  You can create the link in the PKGBUID and have it installed and removed with the rest of the package.

Can the none /opt locations not be used?

Edit:
If the binaries are produced using the following:

 gcc -g -o "%e" "%f" -g -lavutil -lavformat -lavcodec -lz -lavutil -lm 

What dependencies are being avoided?  ffmpeg provides three of the libs,  libm is provides by glibc and libz is a dependency of ffmpeg and sudo so will also be installed.
Rest of the build chain is supplied by base-devel and so is required to be installed.
Building it in the PKGBUILD would also add the standard arch CFLAGS and LDFLAGS e.t.c. for hardening.

Last edited by loqs (2021-06-03 23:03:50)

Offline

#3 2021-06-04 20:43:11

Kanehekili
Member
Registered: 2018-07-28
Posts: 12

Re: Added Videocut to AUR. Would need advice if correctly packaged

Thanks for the feedback. I'll update the contents/build accordingly

Offline

#4 2021-06-04 21:21:20

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Added Videocut to AUR. Would need advice if correctly packaged

Additionally, why do you create a tarball of the files you checked into git (including the binaries!), then check that into git too, then download that?

You're not supposed to check binaries into git. They don't compress well and over time your repo becomes slow. "git tag" your releases, e.g. https://github.com/kanehekili/VideoCut/ … 7-DeltaDTS and then upload the release archive there.

The AUR policy for open source code is that "videocut" needs to build from source, but if you want to "in order to keep the dependencies down" then you may use downloaded binaries in a package named "videocut-bin".

In order to make it easier to build from source in the PKGBUILD, I recommend you add a simple Makefile. smile Consider including an install target so you can do (in the package() function): `make DESTDIR="${pkgdir}" install`


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#5 2021-06-09 20:52:17

Kanehekili
Member
Registered: 2018-07-28
Posts: 12

Re: Added Videocut to AUR. Would need advice if correctly packaged

The tar.gz is my current way to install the software on any Linux distro. Since I'd like to stay distro agnostic, I'd like to keep it. For AUR I'm currently testing my makefile, the next update will also contain the correct license and will build the (rather small) binary. In addition I'll remove the unnecessary .install file - I didn't know I could do it PKGBUILD.

I would like to thank both @eschwartz and @loqs  for your elaborate and helpful answers.

Offline

#6 2021-06-10 00:45:44

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Added Videocut to AUR. Would need advice if correctly packaged

Kanehekili wrote:

The tar.gz is my current way to install the software on any Linux distro. Since I'd like to stay distro agnostic, I'd like to keep it.

I didn't suggest you get rid of it! I suggested you should use the "Downloads" section of github, instead of "git commit"ing your tar.gz into the repo.

https://docs.github.com/en/github/admin … repository

Also being "distro agnostic" unfortunately means you do need to compile from source, since the binaries only support two specific versions of ffmpeg and are documented to work on "probably other distros if they have either ffmpeg 4.0.2 or 3.5"

It's possible to be *truly* independent of distro, but you'd need to compile ffmpeg and ship it in the tar.gz, perhaps by statically linking. That will bloat the tar.gz size though -- and make it more important you use the officially supported "Releases" page.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#7 2021-06-10 18:51:02

Kanehekili
Member
Registered: 2018-07-28
Posts: 12

Re: Added Videocut to AUR. Would need advice if correctly packaged

I did not expect to learn so many things creating a PKGBUILD. I'll look into the git Download and and will rephrase my ffmpeg dependencies. The constraints exist due to a change of the ffmpeg ABI. So a rebuild with an ffmpeg version < 3.5 would not work, since I'm not planning to go into archeological  programming ;-) and dig out the old ABI. So it is "as agnostic as feasable" 

I'm truly grateful for your help.

**Update**
Thanks to valuable input I'm using the github release links now, make the c-library (and found some changes/deprecations - one more reason why it should be build instead of delivered), fixed the license and removed the .install file. Currently my boilerplate for future releases on AUR.

Last edited by Kanehekili (2021-06-12 19:54:31)

Offline

Board footer

Powered by FluxBB