You are not logged in.

#1 2010-09-13 01:27:39

RetroX
Member
Registered: 2009-10-17
Posts: 106

multipkg - A fork of unipkg

Unfortunately, about a month or two ago, the terrible truth dawned upon me - not every GNU/Linux user uses Arch Linux.

Because of this, when packaging software, you have to bundle packages for Ubuntu, Fedora, and most of the other major flavours of GNU/Linux as well.

However, after discovering unipkg, I decided to modify it to give it much more functionality.

AUR Link

unipkg really is just a modified version of makepkg.  Because I currently don't know how to make a man page, here's a nice list of what I've added to makepkg 3.4.1, or unipkg 1.0:
--forcearch <architecture> - This enables you to force a certain architecture to be written to the package even if it is not your own package.  It is the maintainer's responsibility to ensure that this actually compiles for that architecture by modifying the PKGBUILD and makefiles to compile for that architecture (generally intended for 64-bit systems).
--nobuild - This does not run the build function when building a package.  Useful when you've already built the files for a package but want to use them in multiple packages.  When -f is used alongside this option, the pkg/ directory will not be deleted.
-P <extension> - This changes the file extension for the package (used in unipkg).

Currently, .deb and .lzm are supported.  I'm working on .rpm, but for now, it isn't finished, and will result in an error if you choose it.

Several variables were also added to PKGBUILD:
bugsurl - The URL of a bug tracker.
pkglongdesc - Description for the package (multi-line description; note that periods on blank lines will automatically be added for Debian packages).
debsection - The section that the package belongs into - for debian packages.
debpriority - The priority of the package - for debian packages.
deboriginal - Original package - for debian packages.
debtags - Tags for the package - for debian packages.
debsrcpkg - A source package that the package originated from - for debian packages.
debdepends - Dependencies for debian packages.
debpredepends - Pre-dependencies (required for the pre-installation script) for debian packages.
debrecommends - Shows a warning if packages are not installed when the package is installed - for debian packages.
debsuggests - Optional dependencies for debian packages.
debconflicts - Conflicting packages for debian packages.
debreplaces - Replacements for debian packages.
debprovides - Provided packages for debian packages.
debpreinst - Pre-installation script for debian packages.
debprerm - Pre-removal script for debian packages.
debpostinst - Post-installation script for debian packages.
debpostrm - Post-removal script for debian packages.
rpmgroup - Group that the package is in - for RPM packages.
lzmpostinst - Post-installation script for slackware packages.

Something to note is that automatically, architectures will be converted to i386 and amd64 when building Debian packages.  I'll probably change this later, however, these are the architectures that Ubuntu uses.

I'm trying to figure out RPM's format so that I don't have to use the official tools from the AUR, but I might eventually give up and use them.  The site doesn't explain it very well. hmm

Any suggestions are welcome.

Last edited by RetroX (2010-09-13 01:32:17)

Offline

#2 2010-09-13 11:57:31

serprex
Member
Registered: 2010-08-04
Posts: 10
Website

Re: multipkg - A fork of unipkg

I noticed you noted on unipkg that you converted from bc to expr. You could also use Bash's internal integer arithmetic with $(())
expr length is covered by ${#}
It also seems odd to use expr for something the if can cover with -gt

Last edited by serprex (2010-09-13 12:06:48)

Offline

#3 2010-09-13 19:23:50

RetroX
Member
Registered: 2009-10-17
Posts: 106

Re: multipkg - A fork of unipkg

Well, it was a direct copy from makepkg.  That's a makepkg problem, not mine.  It if does get modified in a future version, I will modify it.

Of course, I didn't know much bash when I initially created the package.  I will keep that in mind.

Last edited by RetroX (2010-09-13 19:24:57)

Offline

#4 2012-02-01 14:29:02

benob
Member
Registered: 2008-11-11
Posts: 187

Re: multipkg - A fork of unipkg

For some reason PKGARCH is empty when generating a .deb from a -svn package. I could not figure out why but forcing it to CARCH makes it work.

Thanks for this great script, I love it!

Offline

Board footer

Powered by FluxBB