]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - lfs/sane
Added include file for squidclam and corrected install routine
[people/pmueller/ipfire-2.x.git] / lfs / sane
CommitLineData
08fc1a19
AF
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
4# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
5# #
6# This program is free software: you can redistribute it and/or modify #
7# it under the terms of the GNU General Public License as published by #
8# the Free Software Foundation, either version 3 of the License, or #
9# (at your option) any later version. #
10# #
11# This program is distributed in the hope that it will be useful, #
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
18# #
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
27VER = 1.0.19
28
29THISAPP = sane-$(VER)
30DL_FILE = sane-backends-$(VER).tar.gz
31DL_FROM = $(URL_IPFIRE)
32DIR_APP = $(DIR_SRC)/sane-backends-$(VER)
85e27660
AF
33ifeq "$(KMOD)" "1"
34ifeq "$(SMP)" "1"
35TARGET = $(DIR_INFO)/$(THISAPP)-kmod-smp
36else
37TARGET = $(DIR_INFO)/$(THISAPP)-kmod
38endif
39else
08fc1a19 40TARGET = $(DIR_INFO)/$(THISAPP)
85e27660 41endif
08fc1a19
AF
42PROG = sane
43PAK_VER = 1
44
64187e11 45DEPS = "libtiff"
08fc1a19
AF
46
47###############################################################################
48# Top-level Rules
49###############################################################################
50
51objects = $(DL_FILE)
52
53$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
54
55$(DL_FILE)_MD5 = 8c0936272dcfd4e98c51512699f1c06f
56
57install : $(TARGET)
58
59check : $(patsubst %,$(DIR_CHK)/%,$(objects))
60
61download :$(patsubst %,$(DIR_DL)/%,$(objects))
62
63md5 : $(subst %,%_MD5,$(objects))
64
65dist:
66 $(PAK)
67
68###############################################################################
69# Downloading, checking, md5sum
70###############################################################################
71
72$(patsubst %,$(DIR_CHK)/%,$(objects)) :
73 @$(CHECK)
74
75$(patsubst %,$(DIR_DL)/%,$(objects)) :
76 @$(LOAD)
77
78$(subst %,%_MD5,$(objects)) :
79 @$(MD5)
80
81###############################################################################
82# Installation Details
83###############################################################################
84
85$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
86 @$(PREBUILD)
87 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
85e27660
AF
88ifeq "$(KMOD)" "1"
89 cd $(DIR_APP)/doc/plustek && cp -vf Makefile.kernel26 \
90 $(DIR_APP)/backend/Makefile
91ifeq "$(SMP)" "1"
92 cd $(DIR_APP)/backend && make -C /lib/modules/$(KVER)-ipfire-smp/build/ \
93 SUBDIRS=$(DIR_APP)/backend modules
94 cd $(DIR_APP)/backend && install -m 644 pt_drv.ko \
95 /lib/modules/$(KVER)-ipfire-smp/kernel/drivers/parport/
96else
97 cd $(DIR_APP)/backend && make -C /lib/modules/$(KVER)-ipfire/build/ \
98 SUBDIRS=$(DIR_APP)/backend modules
99 cd $(DIR_APP)/backend && install -m 644 pt_drv.ko \
100 /lib/modules/$(KVER)-ipfire/kernel/drivers/parport/
101endif
102else
3184c6f9
AF
103 cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/etc \
104 --disable-ipv6 \
08fc1a19
AF
105 --enable-parport-directio
106 cd $(DIR_APP) && make $(MAKETUNING)
107 cd $(DIR_APP) && make install
3184c6f9
AF
108 chmod 4755 /usr/bin/scanimage
109 cp -vf $(DIR_SRC)/config/sane/saned.conf /etc/sane.d/
64187e11
AF
110 ln -sf ../init.d/sane /etc/rc.d/rc3.d/S95sane
111 ln -sf ../init.d/sane /etc/rc.d/rc0.d/K10sane
112 ln -sf ../init.d/sane /etc/rc.d/rc6.d/K10sane
3184c6f9
AF
113 install -v -m 644 $(DIR_SRC)/config/backup/includes/sane \
114 /var/ipfire/backup/addons/includes/sane
85e27660 115endif
08fc1a19
AF
116 @rm -rf $(DIR_APP)
117 @$(POSTBUILD)
3184c6f9 118