3

I'm trying to package an already compiled set of binaries including doc, header files, usage examples, etc...

The installation instruction of the original binaries recommends to just copy all files to a directory below /usr

So I've made the following debian/install:

bin/* /usr/tigcc/bin
doc/* /usr/tigcc/doc
examples/* /usr/tigcc/examples
include/* /usr/tigcc/include
lib/* /usr/tigcc/lib
projects/* /usr/tigcc/projects

Now I'm using debuild -uc -us -sa to generate the .deb file. I'm confronted with this error:

 dpkg-genchanges -sa >../tigcc_0.95-0ubuntu2_amd64.changes
dpkg-genchanges: Fehler: Dateienliste-Datei kann nicht gelesen werden: Datei oder Verzeichnis nicht gefunden
#translation: error: couldn't read file list file: File or directory not found

Why am I getting this error? What am I doing wrong?

Edit: debian/rules

#!/usr/bin/make -f
# -*- makefile -*-

export DH_VERBOSE=1

%:
        dh $@

(default from some packaging guide)

Edit: ls -lhR debian

debian:
total 36K
-rw-rw-r-- 1 sebastian sebastian  147 Feb 22 15:45 changelog
-rw-rw-r-- 1 sebastian sebastian    2 Feb 21 23:46 compat
-rw-rw-r-- 1 sebastian sebastian  454 Feb 23 12:43 control
-rw-rw-r-- 1 sebastian sebastian 1.2K Feb 23 12:19 copyright
-rw-rw-r-- 1 sebastian sebastian  148 Feb 26 21:39 install
-rw-rw-r-- 1 sebastian sebastian  102 Feb 23 12:13 postinst
-rw-rw-r-- 1 sebastian sebastian   79 Feb 23 12:13 preinst
-rwxr-xr-x 1 sebastian sebastian   85 Feb 26 21:39 rules
drwxrwxr-x 2 sebastian sebastian 4.0K Feb 21 23:11 source

debian/source:
total 4.0K
-rw-rw-r-- 1 sebastian sebastian 12 Feb 21 23:11 format

EDIT: I tried to create a file debian/files, just because I somehow thought it might help. The error vanished, but debuild just said "nothing to build" a few times and finished without generating a package at all.


Edit: Following the request of one of the people trying to help me, I'm now supplying links to the files used.

The original binaries can be found here, the stuff below debian here.

NOTE: These link point directly to tar archives.

s3lph
  • 14,644
  • 12
  • 60
  • 83

2 Answers2

1

Remove the preceding / character in the /usr/tigcc/… statements in the install file.

Also, you should either make that be opt/tigcc/… or remove the tigcc bit and install them properly integrated into the FHS standard paths, depending on what the binaries are compiled to expect exactly.

Also, add --fail-missing as an argument to dh, like:

%:
    dh $@ --fail-missing

This will cause the build to fail when installed files are not included in the package.

dobey
  • 41,650
0

OK, I will suggest a hackish workaround. Make a backup, then get rid of install, postinstall, preinstall. Then in rules add the following at the end of the file:

override_dh_auto_install:
dh_auto_install
    mkdir debian/packagename
    mv bin/* debian/packagename/usr/tigcc/bin
    mv doc/* debian/packagename/usr/tigcc/doc
    mv examples/* debian/packagename/usr/tigcc/examples
    mv include/* debian/packagename/usr/tigcc/include
    mv lib/* debian/packagename/usr/tigcc/lib
    mv projects/* debian/packagename/usr/tigcc/projects

Then make a copy of the entire dir containing the debian folder and the rest of the pre-compiled binaries, and on that try to build binaries by using debuild -b -us -uc. I suspect that this should work, but make sure that all the paths are correct and that all file move operations proceed as expected.


UPDATE:

I played with the linked binaries and debian dir. I had to adjust the file names, the folder structure and the control and rules directives.

To reproduce the .deb, you need to unpack the binary archive, unpack the debian dir within the extracted tigcc dir, then run debuild -b -us -uc from within the debian folder. Put both archives in a temporary folder, then:

bzip2 -d -c "tigcc-0.95_orig.tar.bz2" | tar -xf - 
cd tigcc/
tar -zxf  "../tigcc-debian.tar.gz"
cd debian/
debuild -b -us -uc
ls -l ../../*deb

Unless you have some missing dependencies, I don't see why this wouldn't work.

landroni
  • 6,011