slang: revert parallelized build
[ipfire-2.x.git] / lfs / foomatic
CommitLineData
fccb3371 1###############################################################################
fccb3371 2# #
70df8302 3# IPFire.org - A linux based firewall #
eee037b8 4# Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> #
70df8302
MT
5# #
6# This program is free software: you can redistribute it and/or modify #
fccb3371 7# it under the terms of the GNU General Public License as published by #
70df8302 8# the Free Software Foundation, either version 3 of the License, or #
fccb3371
MT
9# (at your option) any later version. #
10# #
70df8302 11# This program is distributed in the hope that it will be useful, #
fccb3371
MT
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 #
70df8302 17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
fccb3371
MT
18# #
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
b91712ac
MT
27VER = 4.0.9
28VER_DB = 4.0-$(DATE)
29VER_FILTERS = 4.0.17
30DATE = 20131023
fccb3371
MT
31
32THISAPP = foomatic-$(VER)
b91712ac 33DL_FILE = foomatic-filters-$(VER_FILTERS).tar.gz
fccb3371 34DL_FROM = $(URL_IPFIRE)
b91712ac 35DIR_APP = $(DIR_SRC)/foomatic-filters-$(VER_FILTERS)
fccb3371
MT
36TARGET = $(DIR_INFO)/$(THISAPP)
37PROG = foomatic
25bb3677 38PAK_VER = 3
fccb3371 39
2231d107 40DEPS = "cups ghostscript libtiff hplip"
fccb3371 41
b91712ac
MT
42export LIB_CUPS=/usr/lib/cups
43export CUPS_BACKENDS=/usr/lib/cups/backends
44export CUPS_FILTERS=/usr/lib/cups/filters
45export CUPS_PPDS=/usr/share/cups/model
46
fccb3371
MT
47###############################################################################
48# Top-level Rules
49###############################################################################
50
51objects = $(DL_FILE) \
b91712ac
MT
52 foomatic-db-$(VER_DB).tar.gz \
53 foomatic-db-engine-$(VER).tar.gz
fccb3371
MT
54
55$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
b91712ac 56foomatic-db-$(VER_DB).tar.gz = $(DL_FROM)/foomatic-db-$(VER_DB).tar.gz
fccb3371 57foomatic-db-engine-$(VER).tar.gz = $(DL_FROM)/foomatic-db-engine-$(VER).tar.gz
fccb3371 58
b91712ac
MT
59$(DL_FILE)_MD5 = b05f5dcbfe359f198eef3df5b283d896
60foomatic-db-$(VER_DB).tar.gz_MD5 = ffe38b354cb06a1f3d5e3b01b7e58b0e
61foomatic-db-engine-$(VER).tar.gz_MD5 = 5b33c1adb21e7b6f3652e9a18d0e6f4e
fccb3371
MT
62
63install : $(TARGET)
64
65check : $(patsubst %,$(DIR_CHK)/%,$(objects))
66
67download :$(patsubst %,$(DIR_DL)/%,$(objects))
68
69md5 : $(subst %,%_MD5,$(objects))
70
71dist:
72 $(PAK)
73
74###############################################################################
75# Downloading, checking, md5sum
76###############################################################################
77
78$(patsubst %,$(DIR_CHK)/%,$(objects)) :
79 @$(CHECK)
80
81$(patsubst %,$(DIR_DL)/%,$(objects)) :
82 @$(LOAD)
83
84$(subst %,%_MD5,$(objects)) :
85 @$(MD5)
86
87###############################################################################
88# Installation Details
89###############################################################################
90
91$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
92 @$(PREBUILD)
b91712ac 93 @rm -rf $(DIR_SRC)/foomatic-* && cd $(DIR_SRC) && \
fccb3371 94 tar zxf $(DIR_DL)/$(DL_FILE) && \
b91712ac
MT
95 tar zxf $(DIR_DL)/foomatic-db-$(VER_DB).tar.gz && \
96 tar zxf $(DIR_DL)/foomatic-db-engine-$(VER).tar.gz
a1d042dd 97 cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/etc
fccb3371
MT
98 cd $(DIR_APP) && make $(MAKETUNING)
99 cd $(DIR_APP) && make install
100 cd $(DIR_SRC)/foomatic-db-$(DATE) && ./configure --prefix=/usr --sysconfdir=/etc
101 cd $(DIR_SRC)/foomatic-db-$(DATE) && make $(MAKETUNING)
102 cd $(DIR_SRC)/foomatic-db-$(DATE) && make install
103 cd $(DIR_SRC)/foomatic-db-engine-$(VER) && ./configure --prefix=/usr --sysconfdir=/etc
104 cd $(DIR_SRC)/foomatic-db-engine-$(VER) && make $(MAKETUNING)
105 cd $(DIR_SRC)/foomatic-db-engine-$(VER) && make install
b91712ac
MT
106
107 # Remove unwanted files
108 rm -rfv /usr/lib/ppr \
109 /etc/foomatic/filter.conf.sample \
110 /usr/share/foomatic/templates
111
112 -mkdir -pv /var/cache/foomatic
113
114 -mkdir -pv /etc/foomatic
115 echo "cups" > /etc/foomatic/defaultspooler
116
117 -mkdir -pv /usr/lib/cups/filter
118 ln -svf ../../../bin/foomatic-rip /usr/lib/cups/filter/foomatic-rip
119 ln -svf ../../../bin/foomatic-ppdfile /usr/lib/cups/filter/foomatic-ppdfile
120
fccb3371
MT
121 @rm -rf $(DIR_SRC)/foomatic-*
122 @$(POSTBUILD)