[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Some guidance for library package building



Hello everyone.

Currently I'm developing a library and a command line tool with Autotools. I have 3 directories (lib, include and src).
Then I decided to build a Debian package. Using dh_make I choosed "l" to make a library package following the steps of the official documentation.
Then I fill as correctly as I can all fields on debian/control file for the 2 packages that are to be generated: libfoo and libfoo-dev. I want libfoo to contain the lib*so.* files compiled in /lib directory and libfoo-dev to contain all *.h files (/include) and *.a files (/lib)
When I run debuild this generates empty packages (none of my files, only DEBIAN files). Then I discovered that copying the proper autotools directories into debian/libfoo1/usr and debian/libfoo-dev/usr I could include the files I needed.

I try to figure how must I modify the main Makefile to copy automatically all files to debian/libfoo directories

Makefile

install:
    cp -r lib $(DESTDIR)/
    cp -r include $(DESTDIR)/
    cp -r src/foo $(DESTDIR)/bin


debian/rules --->

install: build
    $(MAKE) DESTDIR=$(CURDIR)/debian/libfoo1 install
    $(MAKE) DESTDIR=$(CURDIR)/debian/libfoo1-dev install

But this copies ALL files and directories. Then I found 2 files: libfoo1.install and libfoo-dev.install that are but patterns for files that are to be installed (include) in each package. How can I use this files? It's any automatic way to do this? Do I need modify the debian/rules or the main Makefile or both?

Thanks in advance.

--
http://www.legadodekain.net


Reply to: