Added scripts for Foxconn SDX55, Quectel EM120, and several old Sierra
Wireless manufactured devices:
* Installed but not used by default, the user needs to setup manual
links from ${pkgdatadir}/fcc-unlock.available.d, to
${pkgsysconfdir}/fcc-unlock.d in order to enable them.
* Installed with rights only for the owner, so that the dispatcher in
ModemManager can validate them.
* They rely on $PATH to find the qmicli/mbimcli tools.
In addition to these scripts, per-vid:pid links are created in the
same ${pkgdatadir}/fcc-unlock.available.d directory, specifying which
are the specific devices that require the FCC unlock operation.
This patch also creates the ${pkgsysconfdir}/fcc-unlock.d and
${pkglibdir}/fcc-unlock.d directories where ModemManager looks for the
enabled tools.
Note that the meson setup doesn't support creating/deleting links
officially yet, so we use a workaround using meson.add_install_script
that is not perfect (i.e. doesn't handle the symlink removal during
uninstall). See https://github.com/mesonbuild/meson/issues/1602
33 lines
802 B
Makefile
33 lines
802 B
Makefile
|
|
# Directory for user-enabled tools
|
|
fccunlockuser = $(pkgsysconfdir)/fcc-unlock.d
|
|
|
|
# Directory for package-enabled tools
|
|
fccunlockpackage = $(pkglibdir)/fcc-unlock.d
|
|
|
|
# Shipped but disabled FCC unlock tools
|
|
fccunlockavailabledir = $(pkgdatadir)/fcc-unlock.available.d
|
|
fccunlockavailable_SCRIPTS = \
|
|
105b \
|
|
1199 \
|
|
1eac \
|
|
$(NULL)
|
|
|
|
EXTRA_DIST = $(fccunlockavailable_SCRIPTS)
|
|
|
|
install-data-hook:
|
|
$(MKDIR_P) $(DESTDIR)$(fccunlockuser); \
|
|
$(MKDIR_P) $(DESTDIR)$(fccunlockpackage); \
|
|
cd $(DESTDIR)$(fccunlockavailabledir); \
|
|
chmod go-rwx *; \
|
|
$(LN_S) -f 105b 105b:e0ab; \
|
|
$(LN_S) -f 1199 03f0:4e1d; \
|
|
$(LN_S) -f 1199 1199:9079; \
|
|
$(LN_S) -f 1199 413c:81a3; \
|
|
$(LN_S) -f 1199 413c:81a8; \
|
|
$(LN_S) -f 1eac 1eac:1001; \
|
|
$(NULL)
|
|
|
|
uninstall-hook:
|
|
cd $(DESTDIR)$(fccunlockavailabledir) && rm -f *:*
|