clinty / cabal-debian

Create a Debianization by examining a .cabal file.
Other
3 stars 3 forks source link

Simple example for creating a Debian package #1

Open amigalemming opened 3 years ago

amigalemming commented 3 years ago

Could you please provide a simple example for how to produce a Debian package from a small Cabal project?

navid-zamani commented 1 year ago

Seconded. I know that for Gentoo, there’s a tool that just creates an ebuild for the cabal archive, and you can just put it in your repository and then install it via the normal system package manager.

I had expected this here to be the same for Debian. But instead of a .deb file, I got a directory.

Also, when starting it normally, it gives no output, while taking some time to run. Maybe a text line that it’s doing something should be shown unless -q or --quiet is given.

navid-zamani commented 1 year ago

This project is a train wreck.

I could now create a debian package, with a lot of manual work, but the damn control file isn’t even valid!

$ ls package
DEBIAN/  usr/

$ ls -R package/DEBIAN
package/DEBIAN:
changelog  compat  control  copyright  haskell-sdl2-utils.install  rules*  source/  watch

package/DEBIAN/source:
format

$ dpkg-deb --build --root-owner-group package
dpkg-deb: error: parsing file 'package/DEBIAN/control' near line 52:
 missing 'Package' field

The content of DEBIAN/ was what cabal-debian spat out for sdl2-2.5.4.0,
and the content of usr/lib/ghc/sdl-2.5.4.0/ was the content of dist-newstyle/build/x86_64-linux/ghc-8.8.4/sdl2-2.5.4.0/build after building the sdl2 package with cabal build. It should work, if cabal-debian wasn’t broken.
But hey, really, it should work like hackport and just take a cabal project and spit out a .deb file…