File: lirc.postinst

package info (click to toggle)
lirc 0.10.1-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 8,364 kB
  • sloc: ansic: 26,717; cpp: 9,066; sh: 5,521; python: 4,362; makefile: 1,034; xml: 63
file content (24 lines) | stat: -rwxr-xr-x 785 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

set -e

rm -f /etc/init.d/lirc

if which systemd-tmpfiles >/dev/null; then
    systemd-tmpfiles --create /usr/lib/tmpfiles.d/lirc.conf || :
fi

# distutils' sysconfig.get_python_lib is broken - #911038. Furthermore, the
# first iteration of this fix did not remove the links in postrm. So:
find /usr/lib/python3/dist-packages -maxdepth 1 -type l -name lirc -delete
find /usr/lib/python3/dist-packages -maxdepth 1 -type l -name lirc-setup -delete
ln -s /usr/lib/*/python*/site-packages/lirc \
    /usr/lib/python3/dist-packages
ln -s /usr/lib/*/python*/site-packages/lirc-setup \
    /usr/lib/python3/dist-packages

# Recompile Python bytecode as needed
py3compile /usr/lib/*/python3.*/site-packages/lirc
py3compile /usr/lib/*/python3.*/site-packages/lirc-setup

#DEBHELPER#