- @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
- cd $(DIR_APP) && make MISDNDIR=/usr/src/linux
- cd $(DIR_APP) && make install MISDNDIR=/usr/src/linux
- -mkdir -p /usr/lib/mISDN
- cd $(DIR_SRC) && tar xfz $(DIR_DL)/mISDN-$(VER).tar.gz
- cd $(DIR_SRC)/mISDN-$(VER) && cp -v config/*.xsl /usr/lib/mISDN
+ @rm -rf $(DIR_SRC)/mISDN* && cd $(DIR_SRC) && tar Jxf $(DIR_DL)/$(DL_FILE)
+ cd $(DIR_SRC)/mISDN && patch -Np1 < $(DIR_SRC)/src/patches/mISDN-hfcusb-reportl1down.patch
+ cd $(DIR_SRC)/mISDN && patch -Np1 < $(DIR_SRC)/src/patches/mISDN_hfc-s_add_id.patch
+ifeq "$(MACHINE_TYPE)" "arm"
+ # Remove unsupported timestampcounter on arm. the result seems to be unused
+ cd $(DIR_SRC)/mISDN && sed -i -e "s|rdtscl(pChan->ulTimestampIn);||g" drivers/isdn/mISDN/octvqe/octvqe_linux.c
+endif
+ifeq "$(NOPCI)" "1"
+ # Disable PCI drivers if kernel has no PCI
+ cd $(DIR_SRC)/mISDN && sed -i -e "s|^CONFIG_MISDN_HFCPCI|#&|g" mISDN.cfg.default
+ cd $(DIR_SRC)/mISDN && sed -i -e "s|^CONFIG_MISDN_HFCMULTI|#&|g" mISDN.cfg.default
+ cd $(DIR_SRC)/mISDN && sed -i -e "s|^CONFIG_MISDN_XHFC|#&|g" mISDN.cfg.default
+ cd $(DIR_SRC)/mISDN && sed -i -e "s|^CONFIG_MISDN_AVMFRITZ|#&|g" mISDN.cfg.default
+ cd $(DIR_SRC)/mISDN && sed -i -e "s|^CONFIG_MISDN_SPEEDFAX|#&|g" mISDN.cfg.default
+ cd $(DIR_SRC)/mISDN && sed -i -e "s|^CONFIG_MISDN_INFINEON|#&|g" mISDN.cfg.default
+ cd $(DIR_SRC)/mISDN && sed -i -e "s|^CONFIG_MISDN_W6692|#&|g" mISDN.cfg.default
+ cd $(DIR_SRC)/mISDN && sed -i -e "s|^CONFIG_MISDN_NETJET|#&|g" mISDN.cfg.default
+ cd $(DIR_SRC)/mISDN && sed -i -e "s|^CONFIG_MISDN_IPAC|#&|g" mISDN.cfg.default
+ cd $(DIR_SRC)/mISDN && sed -i -e "s|^CONFIG_MISDN_ISAR|#&|g" mISDN.cfg.default
+endif
+ cd $(DIR_SRC)/mISDN && ./configure --with-kerneldir=/usr/src/linux
+ cd $(DIR_SRC)/mISDN && make KVERS=$(KVER)-$(VERSUFIX) modules
+ cd $(DIR_SRC)/mISDN && make KVERS=$(KVER)-$(VERSUFIX) \
+ INSTALL_PREFIX=$(DIR_SRC)/mISDN/dest/ \
+ modules_install
+ mv $(DIR_SRC)/mISDN/dest/lib/modules/*/extra \
+ /lib/modules/$(KVER)-$(VERSUFIX)/mISDN
+
+ifneq "$(XEN)" "1"
+ # Blacklist misdn modules
+ for f in $$(find /lib/modules/$(KVER)-$(VERSUFIX)/mISDN -name *.ko); do \
+ echo "blacklist $$(basename $$f)" >> /etc/modprobe.d/mISDN ; \
+ done
+ sed -i -e "s|.ko||g" /etc/modprobe.d/mISDN
+endif
+