Hacker News new | ask | show | jobs
by chriswarbo 3222 days ago
> I've wasted several days trying to get programs I write turned into debs and rpms, I gave up.

The formats themselves are pretty easy to create; for a .deb you just:

- Make the folder hierarchy you want to include, e.g. things like `myBuildFolder/usr/bin/myProgram`

- Make a `myBuildFolder/DEBIAN/debian-binary` file containing `2.0`

- Make a `myBuildFolder/DEBIAN/control` file which contains e.g. the name of the package and its dependencies

- Run `dpkg-deb --build myBuildFolder`

This gives a .deb package which will be tracked by dpkg/apt, allowing clean removals/upgrades/etc. unlike `sudo make install` which will spray cruft all over the system. When I used Debian, I would install all software like this.

I've never made a .deb that's compliant with Debian's packaging policies though, since that does take a lot of effort.