VERSION=1_7_4 DATE=October 2009 FILTER= grep -v "/temp" | \ grep -v "~" | \ grep -v "\#" | \ grep -v "\.orig" | \ grep -v "/\.svn" # # If you want to install the # driver in another place, just # change the "S" variable below: # .if !defined(S) S = /usr/src .endif INCLUDE = /usr/include TEMP = tempfile DIFF = new_ihfc_${VERSION}.diff.bz2 PACKAGE = new_ihfc_${VERSION}.tar.bz2 BACKUP = i4b_system_backup_${VERSION}.tar.bz2 N =\n SITE = http://www.turbocat.net/~hselasky/isdn4bsd/releases ARCH := uname -m CONF_DIR=${S}/sys/${ARCH}/conf .if !exists(${CONF_DIR}/GENERIC) CONF_DIR=${S}/sys/i386/conf .endif REMOVE_FILES=\ ${S}/sys/i386/include/i4b*h \ ${INCLUDE}/machine/i4b*h \ ${INCLUDE}/dev/usb/*h \ ${INCLUDE}/i4b/include/*h \ I4B_FILES=\ ${S}/lib/libcapi20 \ ${S}/sys/i4b \ ${S}/usr.sbin/i4b \ # # some of these files and directories # might need to be updated one day: # #${S}/etc/rc.d/isdnd \ #${S}/etc/rc.isdn \ #${S}/etc/isdn \ #${S}/share/examples/isdn \ #${S}/share/examples/isdn/FAQ \ #${S}/share/examples/isdn/Overview \ #${S}/share/isdn \ #${S}/share/doc/en_US.ISO_8859-1/books/handbook/isdn.html # UAUDIO_FILES=\ ${S}/sys/dev/sound/usb/uaudio.c \ ${S}/sys/dev/sound/usb/uaudio.h \ ${S}/sys/dev/sound/usb/uaudio_pcm.c \ ${S}/sys/dev/sound/usb/uaudioreg.h \ .if defined(WITH_UAUDIO) UAUDIO_FILES+= \ ${S}/sys/dev/sound/pcm/mixer.c \ ${S}/sys/dev/sound/pcm/mixer.h \ .endif WIFI_FILES=\ ${S}/sys/dev/usb/if_ural.c \ ${S}/sys/dev/usb/if_uralreg.h \ ${S}/sys/dev/usb/if_uralvar.h \ ${S}/sys/dev/usb/if_rum.c \ ${S}/sys/dev/usb/if_rumreg.h \ ${S}/sys/dev/usb/if_rumvar.h \ ${S}/sys/dev/usb/if_rumfw.h \ ${S}/sys/dev/usb/if_zyd.c \ ${S}/sys/dev/usb/if_zydfw.h \ ${S}/sys/dev/usb/if_zydreg.h \ USB_MODULES=\ ${S}/sys/modules/ata/atausb/Makefile \ ${S}/sys/modules/aue/Makefile \ ${S}/sys/modules/axe/Makefile \ ${S}/sys/modules/cdce/Makefile \ ${S}/sys/modules/cue/Makefile \ ${S}/sys/modules/if_ndis/Makefile \ ${S}/sys/modules/kue/Makefile \ ${S}/sys/modules/ndis/Makefile \ ${S}/sys/modules/netgraph/bluetooth/ubt/Makefile \ ${S}/sys/modules/netgraph/bluetooth/ubtbcmfw/Makefile \ ${S}/sys/modules/rue/Makefile \ ${S}/sys/modules/rum/Makefile \ ${S}/sys/modules/slhci/Makefile \ ${S}/sys/modules/sound/driver/uaudio/Makefile \ ${S}/sys/modules/uark/Makefile \ ${S}/sys/modules/ubsa/Makefile \ ${S}/sys/modules/ubser/Makefile \ ${S}/sys/modules/uchcom/Makefile \ ${S}/sys/modules/ucom/Makefile \ ${S}/sys/modules/ucycom/Makefile \ ${S}/sys/modules/udav/Makefile \ ${S}/sys/modules/udbp/Makefile \ ${S}/sys/modules/ufm/Makefile \ ${S}/sys/modules/ufoma/Makefile \ ${S}/sys/modules/uftdi/Makefile \ ${S}/sys/modules/ugen/Makefile \ ${S}/sys/modules/ugensa/Makefile \ ${S}/sys/modules/uhid/Makefile \ ${S}/sys/modules/uipaq/Makefile \ ${S}/sys/modules/ukbd/Makefile \ ${S}/sys/modules/ulpt/Makefile \ ${S}/sys/modules/umass/Makefile \ ${S}/sys/modules/umct/Makefile \ ${S}/sys/modules/umodem/Makefile \ ${S}/sys/modules/umoscom/Makefile \ ${S}/sys/modules/ums/Makefile \ ${S}/sys/modules/uplcom/Makefile \ ${S}/sys/modules/ural/Makefile \ ${S}/sys/modules/urio/Makefile \ ${S}/sys/modules/usb/Makefile \ ${S}/sys/modules/uscanner/Makefile \ ${S}/sys/modules/uslcom/Makefile \ ${S}/sys/modules/uss820_dci/Makefile \ ${S}/sys/modules/uvisor/Makefile \ ${S}/sys/modules/uvscom/Makefile \ ${S}/sys/modules/zyd/Makefile \ USB_FILES=\ ${USB_MODULES} \ ${S}/sys/arm/at91/at91_udp.c \ ${S}/sys/arm/at91/ohci_atmelarm.c \ ${S}/sys/tools/usbdevs2h.awk\ ${S}/sys/dev/ata/ata-usb.c \ ${S}/sys/dev/if_ndis/if_ndis_usb.c \ ${S}/sys/dev/usb \ ${S}/sys/netgraph/bluetooth/drivers/ubt/TODO \ ${S}/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c \ ${S}/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h \ ${S}/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c \ CONFIG_FILES=\ ${S}/sys/conf/files \ ${S}/sys/conf/files.pc98 \ ${S}/sys/conf/files.i386 \ HEADER_FIX_FILES=\ ${S}/usr.sbin/ppp/i4b.c \ ${S}/share/examples/isdn/v21/v21modem.c \ ${S}/share/examples/isdn/contrib/hplay.c \ ${S}/share/examples/isdn/contrib/isdntelmux.c \ ${S}/share/examples/isdn/i4brunppp/i4brunppp.c \ DIFF_FILES=\ ${HEADER_FIX_FILES} \ ${UAUDIO_FILES} \ ${WIFI_FILES} \ ${S}/sys/conf/kmod.mk \ ${S}/sys/dev/sound/pcm/sound.c \ ${S}/etc/mtree/BSD.include.dist \ ${S}/include/Makefile \ ${S}/usr.sbin/Makefile.inc \ ${S}/usr.sbin/usbd/usbd.c \ ${S}/lib/Makefile \ BACKUP_FILES=\ ${REMOVE_FILES} \ ${I4B_FILES} \ ${USB_FILES} \ ${CONFIG_FILES} \ ${DIFF_FILES} \ PACKAGE_FILES=`find ${I4B_FILES} ${USB_FILES} | ${FILTER}` FILES_APPEND='\ ${N}\# \ ${N}\# ISDN4BSD system files \ ${N}i4b_drivers.o optional i4b dependency \"$$S/i4b/layer4/i4b_drivers.awk Makefile\" compile-with \"$${AWK} -f $${.ALLSRC} | $${CC} -c -o $${.TARGET} $${ASM_CFLAGS} $${WERROR} -\" no-implicit-rule clean \"i4b_drivers.o\" \ ${N}i4b/driver/i4b_trace.c optional i4btrc \ ${N}i4b/driver/i4b_rbch.c optional i4brbch \ ${N}i4b/driver/i4b_tel.c optional i4btel \ ${N}i4b/driver/i4b_ing.c optional i4bing \ ${N}i4b/driver/i4b_ipr.c optional i4bipr \ ${N}i4b/driver/i4b_isppp.c optional i4bisppp \ ${N}i4b/driver/i4b_ctl.c optional i4bctl \ ${N}net/slcompress.c optional i4bipr \ ${N}net/slcompress.c optional i4bisppp \ ${N}net/if_spppsubr.c optional i4bisppp \ ${N}net/if_spppfr.c optional i4bisppp \ ${N}i4b/dss1/dss1_l2fsm.c optional i4b \ ${N}i4b/dss1/dss1_l2fsm.c optional i4bdss1 \ ${N}i4b/layer4/i4b_capidrv.c optional i4b \ ${N}i4b/layer4/i4b_i4bdrv.c optional i4b \ ${N}i4b/layer4/i4b_l4.c optional i4b \ ${N}i4b/layer4/i4b_l4mgmt.c optional i4b \ ${N}i4b/layer4/i4b_mbuf.c optional i4b \ ${N}i4b/layer1/i4b_l1.c optional i4b \ ${N}i4b/layer1/i4b_echo_cancel.c optional i4b \ ${N}i4b/layer1/i4b_dtmf.c optional i4b \ ${N}i4b/layer1/i4b_convert_xlaw.c optional i4b \ ${N}i4b/layer1/i4b_hdlc.c optional i4b \ ${N}\# \ ${N}\# ISDN4BSD driver files \ ${N}i4b/layer1/ihfc2/i4b_ihfc2_l1if.c optional ihfc \ ${N}i4b/layer1/ihfc2/i4b_ihfc2_pnp.c optional ihfc \ ${N}i4b/layer1/ihfc2/i4b_ihfc2_drv.c optional ihfc \ ${N}i4b/layer1/ihfc2/i4b_ihfc2_dev.c optional ihfc \ ${N}i4b/layer1/ihfc2/i4b_ihfc2_end.c optional ihfc \ ${N}\# \ ${N}\# USB support \ ${N}dev/usb/usb.c optional usb \ ${N}dev/usb/usb_requests.c optional usb \ ${N}dev/usb/usb_subr.c optional usb \ ${N}dev/usb/usb_transfer.c optional usb \ ${N}dev/usb/usb_template.c optional usb \ ${N}dev/usb/usb_template_cdce.c optional usb \ ${N}dev/usb/usb_template_msc.c optional usb \ ${N}dev/usb/usb_compat_linux.c optional usb \ ${N}dev/usb/usb_cdev.c optional usb \ ${N}dev/usb/usb_hid.c optional usb \ ${N}usbdevs.h optional usb dependency \"$$S/tools/usbdevs2h.awk $$S/dev/usb/usbdevs\" compile-with \"$${AWK} -f $$S/tools/usbdevs2h.awk $$S/dev/usb/usbdevs\" no-obj no-implicit-rule before-depend clean \"usbdevs.h\" \ ${N}' # # "øå" are substituted for # "\n" and "\t", respectivly # M=øå BSD_INCLUDE_DIST_APPEND_2="åi4b${M} include${M} ..${M}..ø.." HELP='\#\ ${N}\# ISDN4BSD v.${VERSION:C/_/./g} for FreeBSD 6/7/8 - ${DATE} \ ${N}\# \ ${N}\# source directory: ${S} \ ${N}\# backup directory: ${.CURDIR} \ ${N}\# targets: help fetch all install deinstall clean \ ${N}\# distclean WITH_UAUDIO=YES WITH_WIFI=YES \ ${N}\# \ ${N}\# \ ${N}\# 0. If you installed an older \ ${N}\# version of this package, try \ ${N}\# to deinstall it first or do a \ ${N}\# cvsup of your kernel source code. \ ${N}\# \ ${N}\# 1. Install this package:\ ${N}\# \"make install\" \ ${N}\# \ ${N}\# 2. Make sure that the following lines are \ ${N}\# in your kernel configuration file, \ ${N}\# for example \"${CONF_DIR}/custom\": \ ${N}\# \ ${N}\# I4B section \ ${N}\# \ ${N}options IPR_VJ \ ${N}device \"i4bdss1\" \ ${N}device \"i4b\" \ ${N}device \"i4btrc\" \ ${N}device \"i4bctl\" \ ${N}device \"i4brbch\" \ ${N}device \"i4btel\" \ ${N}device \"i4bipr\" \ ${N}device \"i4bisppp\" \ ${N}\# \ ${N}\# If you need more than 8 units please \ ${N}\# edit \"${S}/sys/i4b/include/i4b_global.h\", \ ${N}\# until further. \ ${N}\# \ ${N}\ ${N}device ihfc \ ${N}device usb \ ${N}device pcm \ ${N}\#or device sound \ ${N}\#if device pcm does not exist \ ${N}\ ${N}\# \ ${N}\# 3. Recompile and install the kernel: \ ${N}\# \"cd ${S} && make buildkernel installkernel \ ${N}\# KERNCONF=custom -DNOCLEAN -DNO_CLEAN\" \ ${N}\# \ ${N}\# The second time you run make \ ${N}\# you can add -DNO_KERNELDEPEND \ ${N}\# to speed up the compilation. \ ${N}\# \ ${N}\# 4. Write down the kernel backup location, \ ${N}\# \"${.CURDIR}/kernel\", and reboot. \ ${N}\# \ ${N}\ ${N}\# \ ${N}\# In case of trouble you can send an e-mail to: \ ${N}\# hselasky@c2i.net \ ${N}\ ${N}\# Type \"make help\" to display this message again \ ${N}' help: @printf ${HELP} fetch: fetch ${SITE}/FreeBSD/${VERSION}/${DIFF} fetch ${SITE}/FreeBSD/${VERSION}/${PACKAGE} backup: @echo "" @echo "Installing sources to \"${S}\"" @echo "Installing headers to \"${INCLUDE}\"" @echo "" @echo "Kernel backup location is \"${.CURDIR}/kernel\"" @echo "" @sleep 10 .if exists(${BACKUP}.dont.remove) @echo "Backup already exists ... continuing" @echo "" @echo "If you want to remove the backup run \"make distclean\"" @echo "" .else @echo "" @echo "Backup in progress ..." @echo "" # # "/etc/isdn/answer" needs the # following directory: # mkdir /var/isdn || echo -n # # make directory tree # mkdir ${S} || echo -n mkdir ${S}/lib || echo -n mkdir ${S}/lib/libcapi20 || echo -n mkdir ${S}/usr.sbin || echo -n mkdir ${S}/usr.sbin/i4b || echo -n mkdir ${S}/usr.sbin/ppp || echo -n mkdir ${S}/usr.sbin/usbd || echo -n mkdir ${S}/sys || echo -n mkdir ${S}/sys/arm || echo -n mkdir ${S}/sys/arm/at91 || echo -n mkdir ${S}/sys/i4b || echo -n mkdir ${S}/sys/dev || echo -n mkdir ${S}/sys/dev/if_ndis || echo -n mkdir ${S}/sys/dev/sound || echo -n mkdir ${S}/sys/dev/sound/isa || echo -n mkdir ${S}/sys/dev/sound/pcm || echo -n mkdir ${S}/sys/dev/sound/usb || echo -n mkdir ${S}/sys/dev/ata || echo -n mkdir ${S}/sys/dev/usb || echo -n mkdir ${S}/sys/modules || echo -n mkdir ${S}/sys/modules/ata || echo -n mkdir ${S}/sys/modules/ata/atausb || echo -n mkdir ${S}/sys/modules/aue || echo -n mkdir ${S}/sys/modules/axe || echo -n mkdir ${S}/sys/modules/cdce || echo -n mkdir ${S}/sys/modules/cue || echo -n mkdir ${S}/sys/modules/if_ndis || echo -n mkdir ${S}/sys/modules/kue || echo -n mkdir ${S}/sys/modules/ndis || echo -n mkdir ${S}/sys/modules/netgraph || echo -n mkdir ${S}/sys/modules/netgraph/bluetooth || echo -n mkdir ${S}/sys/modules/netgraph/bluetooth/ubt || echo -n mkdir ${S}/sys/modules/netgraph/bluetooth/ubtbcmfw || echo -n mkdir ${S}/sys/modules/rue || echo -n mkdir ${S}/sys/modules/rum || echo -n mkdir ${S}/sys/modules/slhci || echo -n mkdir ${S}/sys/modules/sound || echo -n mkdir ${S}/sys/modules/sound/driver || echo -n mkdir ${S}/sys/modules/sound/driver/uaudio || echo -n mkdir ${S}/sys/modules/uark || echo -n mkdir ${S}/sys/modules/ubsa || echo -n mkdir ${S}/sys/modules/ubser || echo -n mkdir ${S}/sys/modules/uchcom || echo -n mkdir ${S}/sys/modules/ucom || echo -n mkdir ${S}/sys/modules/ucycom || echo -n mkdir ${S}/sys/modules/udav || echo -n mkdir ${S}/sys/modules/udbp || echo -n mkdir ${S}/sys/modules/ufm || echo -n mkdir ${S}/sys/modules/ufoma || echo -n mkdir ${S}/sys/modules/uftdi || echo -n mkdir ${S}/sys/modules/ugen || echo -n mkdir ${S}/sys/modules/ugensa || echo -n mkdir ${S}/sys/modules/uhid || echo -n mkdir ${S}/sys/modules/uipaq || echo -n mkdir ${S}/sys/modules/ukbd || echo -n mkdir ${S}/sys/modules/ulpt || echo -n mkdir ${S}/sys/modules/umass || echo -n mkdir ${S}/sys/modules/umct || echo -n mkdir ${S}/sys/modules/umodem || echo -n mkdir ${S}/sys/modules/umoscom || echo -n mkdir ${S}/sys/modules/ums || echo -n mkdir ${S}/sys/modules/uplcom || echo -n mkdir ${S}/sys/modules/ural || echo -n mkdir ${S}/sys/modules/urio || echo -n mkdir ${S}/sys/modules/usb || echo -n mkdir ${S}/sys/modules/uscanner || echo -n mkdir ${S}/sys/modules/uslcom || echo -n mkdir ${S}/sys/modules/uss820_dci || echo -n mkdir ${S}/sys/modules/uvisor || echo -n mkdir ${S}/sys/modules/uvscom || echo -n mkdir ${S}/sys/modules/zyd || echo -n mkdir ${S}/sys/netgraph || echo -n mkdir ${S}/sys/netgraph/bluetooth || echo -n mkdir ${S}/sys/netgraph/bluetooth/drivers || echo -n mkdir ${S}/sys/netgraph/bluetooth/drivers/ubt || echo -n mkdir ${S}/sys/netgraph/bluetooth/drivers/ubtbcmfw || echo -n mkdir ${S}/sys/conf || echo -n mkdir ${S}/sys/i386 || echo -n mkdir ${S}/sys/i386/include || echo -n mkdir ${S}/sys/tools || echo -n mkdir ${S}/etc || echo -n mkdir ${S}/etc/mtree || echo -n mkdir ${S}/include || echo -n mkdir ${S}/share || echo -n mkdir ${S}/share/examples || echo -n mkdir ${S}/share/examples/isdn || echo -n mkdir ${S}/share/examples/isdn/v21 || echo -n mkdir ${S}/share/examples/isdn/contrib || echo -n mkdir ${S}/share/examples/isdn/i4brunppp || echo -n mkdir ${INCLUDE} || echo -n mkdir ${INCLUDE}/i4b || echo -n mkdir ${INCLUDE}/i4b/include || echo -n mkdir ${INCLUDE}/dev || echo -n mkdir ${INCLUDE}/dev/usb || echo -n mkdir ${INCLUDE}/machine || echo -n # # create missing files # .for FILE in \ ${S}/sys/i386/include/i4b_ioctl.h \ ${INCLUDE}/i4b/include/i4b_ioctl.h \ ${INCLUDE}/dev/usb/usb.h \ ${INCLUDE}/machine/i4b_ioctl.h \ ${I4B_FILES} \ ${USB_FILES} \ ${CONFIG_FILES} \ ${DIFF_FILES} @ [ -f ${FILE} ] || [ -d ${FILE} ] || touch ${FILE} || echo -n .endfor # # try to cleanup the source tree # before it is backed up # (cd ${S}/usr.sbin/i4b && make clean) || echo -n (cd ${S}/lib/libcapi20 && make clean) || echo -n # # do backup # cp -v /boot/kernel/kernel . tar -jcvf ${BACKUP} -C/ ${BACKUP_FILES} @touch ${BACKUP}.dont.remove sync .endif update_sound_c: sed -e s/"MTX_DEF)"/"MTX_DEF|MTX_RECURSE)"/g \ -e s/"d->flags = 0;"/""/g \ ${S}/sys/dev/sound/pcm/sound.c \ > ${TEMP} cat ${TEMP} > ${S}/sys/dev/sound/pcm/sound.c update_config: # # cleanup # .for FILE in ${CONFIG_FILES} cat ${FILE} \ | grep -v "ihfc | isic | itjc | iwic" \ | grep -v " i4b" \ | grep -v " new_usb" \ | grep -v "i4b/" \ | grep -v "dev/usb2" \ | grep -v "dev/usb/usb.c" \ | grep -v "dev/usb/usb_mem.c" \ | grep -v "dev/usb/usb_requests.c" \ | grep -v "dev/usb/usb_subr.c" \ | grep -v "dev/usb/usb_compat_linux.c" \ | grep -v "dev/usb/usb_transfer.c" \ | grep -v "dev/usb/usb_cdev.c" \ | grep -v "dev/usb/usb_hid.c" \ | grep -v "dev/usb/usb_ethersubr.c" \ | grep -v "dev/usb/usbdi.c" \ | grep -v "dev/usb/usbdi_util.c" \ | grep -v "dev/usb/hid.c" \ | grep -v "dev/usb/usb_template.c" \ | grep -v "dev/usb/usb_template_cdce.c" \ | grep -v "dev/usb/usb_template_msc.c" \ | sed -e s/"S\/dev\/usb\/usbdevs -h"/"S\/dev\/usb\/usbdevs"/g \ | sed -e s/"S\/dev\/usb\/usbdevs -d"/"S\/dev\/usb\/usbdevs"/g \ > ${TEMP} cat ${TEMP} > ${FILE} .endfor # # update # @printf ${FILES_APPEND} >> ${S}/sys/conf/files all: build: @echo "All done." install: ${DIFF} ${PACKAGE} help backup update_config update_sound_c # cleanup rm -f -rv ${I4B_FILES} ${USB_FILES} ${REMOVE_FILES} || echo -n # install package tar -opjxmvf ${PACKAGE} -C${S} # install header files cp -v ${S}/sys/i4b/include/*h ${INCLUDE}/i4b/include/ || echo -n cp -v ${S}/sys/dev/usb/*h ${INCLUDE}/dev/usb/ || echo -n # # touch some files so that the kernel is rebuilt # properly # touch \ ${S}/sys/dev/usb/usbdevs \ ${S}/sys/dev/usb/*c || echo -n # patch 1 @echo "These patches are not critical. Don't worry if they fail:" (bzcat ${DIFF} | patch -N -l -d ${S}) || echo -n # patch 2 (obsolete) # patch 3 cat ${S}/include/Makefile \ | sed -e s/" dev\/usb i4b\/include "/" dev\/usb "/g \ | sed -e s/" dev\/usb2 i4b\/include "/" "/g \ | sed -e s/" dev\/usb2 "/" "/g \ | sed -e s/" dev\/usb "/" dev\/usb i4b\/include "/g \ > ${TEMP} cat ${TEMP} > ${S}/include/Makefile # patch 4 cat ${S}/sys/conf/kmod.mk \ | sed -e s/"@\/dev\/usb\/usbdevs -h"/"@\/dev\/usb\/usbdevs"/g \ | sed -e s/"@\/dev\/usb\/usbdevs -d"/"@\/dev\/usb\/usbdevs"/g \ > ${TEMP} cat ${TEMP} > ${S}/sys/conf/kmod.mk # patch 5 .if !exists(${S}/sys/net/if_spppfr.c) touch ${S}/sys/net/if_spppfr.c || echo -n .endif # patch 6 (obsolete) # patch 7 # # remove lines # starting with a TAB, then # hook in some directories # cat ${S}/etc/mtree/BSD.include.dist \ | sed -e s/"^\.\. *$$"/${BSD_INCLUDE_DIST_APPEND_2}/g \ | tr "øå" "\n\t" \ | cat - \ > ${TEMP} cat ${TEMP} > ${S}/etc/mtree/BSD.include.dist # patch 8 # # cat ${S}/lib/Makefile \ | grep -v "^SUBDIR+= libcapi20" \ | grep -v "^.include " \ | cat - \ > ${TEMP} echo "SUBDIR+= libcapi20" >> ${TEMP} echo ".include " >> ${TEMP} cat ${TEMP} > ${S}/lib/Makefile # patch 9 # # [ -f ${S}/usr.sbin/Makefile.inc ] || \ (echo "BINDIR?=/usr/sbin" >> ${S}/usr.sbin/Makefile.inc) # patch 10 # # update some #include <... statements .for FILE in ${HEADER_FIX_FILES} cat ${FILE} \ | sed -e "s/ ${TEMP} cat ${TEMP} > ${FILE} .endfor # patch 11 # # .if !defined(WITH_UAUDIO) rm -f ${UAUDIO_FILES} || echo -n touch ${UAUDIO_FILES} || echo -n .endif # patch 12 .if !defined(WITH_WIFI) rm -f ${WIFI_FILES} || echo -n touch ${WIFI_FILES} || echo -n .endif # patch 13 rm -f ${S}/usr.sbin/usbd/usbd.c || echo -n (echo "int main() { return 0; }" > ${S}/usr.sbin/usbd/usbd.c) || echo -n # # final install # cd ${S}/lib/libcapi20 && make cleandepend clean cd ${S}/lib/libcapi20 && make depend all install cd ${S}/usr.sbin/i4b && make cleandepend clean cd ${S}/usr.sbin/i4b && make depend all install man ihfc uninstall: deinstall deinstall: ${BACKUP} @echo "" @echo "Deinstalling sources from \"${S}\"" @echo "Deinstalling headers from \"${INCLUDE}\"" @echo "" @sleep 10 rm -f -rv ${I4B_FILES} ${USB_FILES} ${REMOVE_FILES} || echo -n tar -jxvf ${BACKUP} -C/ # # make sure a new backup is made at next # install # rm -f ${BACKUP}.dont.remove || echo -n clean: rm -f ${TEMP} || echo -n distclean: rm -f ${TEMP} ${BACKUP}.dont.remove || echo -n diffs: clean touch ${TEMP} .for FILE in ${DIFF_FILES:C/${S}\///g} .if exists(${S}.diff/${FILE}.ref) @((( cd ${S}.diff && diff -b -cr ${FILE}.ref ${FILE} ) >> ${TEMP}) \ && echo "\"${S}.diff/${FILE}\" does not differ!") || echo -n .else @echo "\"${S}.diff/${FILE}.ref\" does not exist!" .endif .endfor bzip2 ${TEMP} && mv ${TEMP}.bz2 ${DIFF} sorry: @echo "The system is currently under reconstruction. " @echo "Please check out again in some hours!" @exit 1 package: diffs @cd ${S}/lib/libcapi20 && make clean cleandepend @cd ${S}/usr.sbin/i4b && make clean cleandepend (cd ${S} && tar --norecurse -cvf - ${PACKAGE_FILES:C/${S}\///g}) > ${TEMP} bzip2 ${TEMP} && mv ${TEMP}.bz2 ${PACKAGE} list_files: cd ${S} && ls -l ${PACKAGE_FILES:C/${S}\///} print_all: @printf ${FILES_APPEND} @printf '${BSD_INCLUDE_DIST_APPEND_2}' #--HPS