[systemd-devel] [PATCH] build: generate pkg-config files during configure
Simon McVittie
simon.mcvittie at collabora.co.uk
Thu Mar 12 04:08:57 PDT 2015
On 12/03/15 07:50, Umut Tezduyar Lindskog wrote:
> Ok! I have another problem with pc files but I solve it downstream.
> When I configure systemd with --configure=/usr and set the DESTDIR to
> my host path, the pc files don't have the DESTDIR extension. I solve
> it manually by 'sed'ding the files after installation.
.pc files intentionally do not contain the DESTDIR in their paths.
DESTDIR should never be hard-coded into any installed file, since that
would not work in situations where you have installed the headers,
libraries etc. in their intended target path /usr/include,
/usr/lib{,32,64,/MULTIARCH} etc., as is done on dpkg, rpm etc. systems.
The DESTDIR is for "staged installs" as used by dpkg/rpm. Here is a
massively oversimplified version of how dpkg packages are built:
./configure --prefix=/usr
make
make install DESTDIR=$(pwd)/debian/tmp
tar -C $(pwd)/debian/tmp -czf data.tar.gz .
# now data.tar.gz contains e.g. ./usr/bin/foo, ./usr/include/foo.h,
# ./usr/lib/i386-linux-gnu/libfoo.so*
and most other packaging systems are similar.
--
Simon McVittie
Collabora Ltd. <http://www.collabora.com/>
More information about the systemd-devel
mailing list