I had a look at the package source and only the paths in the file debian/rules [1] have to be changed. Extend all `lib/$(DEB_HOST_MULTIARCH)` to `lib/$(DEB_HOST_MULTIARCH)/security` (added suffix `/security`).

[1] https://sources.debian.org/src/libpam-chroot/0.9-5/debian/rules/

Here the changed lines I tested successfully:

```
    mkdir -p $(CURDIR)/debian/libpam-chroot/lib/$(DEB_HOST_MULTIARCH)/security
    # Add here commands to install the package into debian/libpam-chroot
    $(MAKE) install DESTDIR=$(CURDIR)/debian/libpam-chroot LIBDIR=$(CURDIR)/debian/libpam-chroot/lib/$(DEB_HOST_MULTIARCH)/security INSTALL="install --strip-program=true"
```

Enable source repositories, install build tools and dependencies, then build and install:

```
nano /etc/apt/sources.list
apt-get update
apt-get install devscripts build-essential
cd /var/tmp
apt-get build-dep libpam-chroot
apt-get source libpam-chroot
cd libpam-chroot-0.9*/
sed -i -e 's#lib/\$(DEB_HOST_MULTIARCH)\( \|$\)#lib/\$(DEB_HOST_MULTIARCH\)/security\1#' debian/rules
debuild -us -uc
#
cd /var/tmp
dpkg -i libpam-chroot_0.9*.deb
```

Reply via email to