mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
125 lines
4.5 KiB
Plaintext
125 lines
4.5 KiB
Plaintext
###############################################################################
|
|
# This file is part of the IPCop Firewall. #
|
|
# #
|
|
# IPCop is free software; you can redistribute it and/or modify #
|
|
# it under the terms of the GNU General Public License as published by #
|
|
# the Free Software Foundation; either version 2 of the License, or #
|
|
# (at your option) any later version. #
|
|
# #
|
|
# IPCop is distributed in the hope that it will be useful, #
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
|
# GNU General Public License for more details. #
|
|
# #
|
|
# You should have received a copy of the GNU General Public License #
|
|
# along with IPCop; if not, write to the Free Software #
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
|
# #
|
|
# Makefiles are based on LFSMake, which is #
|
|
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
|
|
# #
|
|
# Modifications by: #
|
|
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
|
|
# - Modified Makefile for IPCop build #
|
|
# #
|
|
# $Id: makedev,v 1.11.2.3 2005/02/05 15:38:15 gespinasse Exp $
|
|
# #
|
|
###############################################################################
|
|
|
|
###############################################################################
|
|
# Definitions
|
|
###############################################################################
|
|
|
|
include Config
|
|
|
|
VER = 1.2
|
|
|
|
THISAPP = make_devices-$(VER)
|
|
DL_FILE = $(THISAPP).bz2
|
|
DL_FROM = $(URL_LFS_FTP)
|
|
TARGET = $(DIR_INFO)/$(THISAPP)
|
|
|
|
###############################################################################
|
|
# Top-level Rules
|
|
###############################################################################
|
|
|
|
objects = $(DL_FILE)
|
|
|
|
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
|
|
|
$(DL_FILE)_MD5 = 2863fbe7f5953efb5a0d0a840e1e9d21
|
|
|
|
install : $(TARGET)
|
|
|
|
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
|
|
|
|
download :$(patsubst %,$(DIR_DL)/%,$(objects))
|
|
|
|
md5 : $(subst %,%_MD5,$(objects))
|
|
|
|
###############################################################################
|
|
# Downloading, checking, md5sum
|
|
###############################################################################
|
|
|
|
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
|
|
@$(CHECK)
|
|
|
|
$(patsubst %,$(DIR_DL)/%,$(objects)) :
|
|
@$(LOAD)
|
|
|
|
$(subst %,%_MD5,$(objects)) :
|
|
@$(MD5)
|
|
|
|
###############################################################################
|
|
# Installation Details
|
|
###############################################################################
|
|
|
|
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
|
@$(PREBUILD)
|
|
cd /dev && bzcat $(DIR_DL)/$(DL_FILE) > make_devices
|
|
cd /dev && chmod 754 make_devices
|
|
cd /dev && patch -Np0 < $(DIR_SRC)/src/patches/make_devices.patch
|
|
cd /dev && ./make_devices
|
|
# ipsec
|
|
cd /dev && rm -f ipsec
|
|
cd /dev && mknod ipsec c 36 10
|
|
chmod 200 /dev/ipsec
|
|
|
|
# tap/tun
|
|
cd /dev/net && rm -f tun
|
|
cd /dev/net && mknod tun c 10 200
|
|
|
|
# PULSARDSL Devices
|
|
cd /dev && rm -f ttyG0
|
|
cd /dev && mknod ttyG0 c 43 0
|
|
cd /dev && rm -f cug0
|
|
cd /dev && mknod cug0 c 44 0
|
|
|
|
# ISDN Symlink + Permissions
|
|
cd /dev && ln -sf isdnctrl0 isdnctrl
|
|
|
|
# isdninfo
|
|
cd /dev && rm -f isdninfo
|
|
cd /dev && mknod isdninfo c 45 255
|
|
chown root:nobody /dev/isdninfo
|
|
chmod 640 /dev/isdninfo
|
|
|
|
# USB HID Dev
|
|
-mkdir /dev/usb
|
|
for i in `seq 0 7`; do \
|
|
rm -f /dev/usb/hiddev$$i; \
|
|
mknod /dev/usb/hiddev$$i c 180 $$(( 96 + $$i )); \
|
|
done
|
|
|
|
# USB ACM Modems
|
|
for i in `seq 0 7`; do \
|
|
rm -f /dev/usb/ttyACM$$i; \
|
|
mknod /dev/usb/ttyACM$$i c 166 $$i; \
|
|
done
|
|
|
|
# Add a symlink to the default floppy dev. updfstab will change it to USB if
|
|
# necessary, but it must be present if it appears in /etc/mtab
|
|
cd /dev && ln -sf fd0 floppy
|
|
|
|
@$(POSTBUILD)
|