]>
Commit | Line | Data |
---|---|---|
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 | ||
25 | include Config | |
26 | ||
27 | VER = 1.0.19 | |
28 | ||
29 | THISAPP = sane-$(VER) | |
30 | DL_FILE = sane-backends-$(VER).tar.gz | |
31 | DL_FROM = $(URL_IPFIRE) | |
32 | DIR_APP = $(DIR_SRC)/sane-backends-$(VER) | |
85e27660 AF |
33 | ifeq "$(KMOD)" "1" |
34 | ifeq "$(SMP)" "1" | |
35 | TARGET = $(DIR_INFO)/$(THISAPP)-kmod-smp | |
36 | else | |
37 | TARGET = $(DIR_INFO)/$(THISAPP)-kmod | |
38 | endif | |
39 | else | |
08fc1a19 | 40 | TARGET = $(DIR_INFO)/$(THISAPP) |
85e27660 | 41 | endif |
08fc1a19 AF |
42 | PROG = sane |
43 | PAK_VER = 1 | |
44 | ||
64187e11 | 45 | DEPS = "libtiff" |
08fc1a19 AF |
46 | |
47 | ############################################################################### | |
48 | # Top-level Rules | |
49 | ############################################################################### | |
50 | ||
51 | objects = $(DL_FILE) | |
52 | ||
53 | $(DL_FILE) = $(DL_FROM)/$(DL_FILE) | |
54 | ||
55 | $(DL_FILE)_MD5 = 8c0936272dcfd4e98c51512699f1c06f | |
56 | ||
57 | install : $(TARGET) | |
58 | ||
59 | check : $(patsubst %,$(DIR_CHK)/%,$(objects)) | |
60 | ||
61 | download :$(patsubst %,$(DIR_DL)/%,$(objects)) | |
62 | ||
63 | md5 : $(subst %,%_MD5,$(objects)) | |
64 | ||
65 | dist: | |
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 |
88 | ifeq "$(KMOD)" "1" |
89 | cd $(DIR_APP)/doc/plustek && cp -vf Makefile.kernel26 \ | |
90 | $(DIR_APP)/backend/Makefile | |
91 | ifeq "$(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/ | |
96 | else | |
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/ | |
101 | endif | |
102 | else | |
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 | 115 | endif |
08fc1a19 AF |
116 | @rm -rf $(DIR_APP) |
117 | @$(POSTBUILD) | |
3184c6f9 | 118 |