From 64c5bbc453a4ca7419d8ab795efd7ab38d1885d0 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 24 Oct 2013 15:12:09 +0200 Subject: [PATCH] mpage: New package. Required for foomatic 4.x. --- config/rootfiles/common/mpage | 9 ++++ lfs/mpage | 77 ++++++++++++++++++++++++++++++++ make.sh | 1 + src/patches/mpage25-config.patch | 46 +++++++++++++++++++ 4 files changed, 133 insertions(+) create mode 100644 config/rootfiles/common/mpage create mode 100644 lfs/mpage create mode 100644 src/patches/mpage25-config.patch diff --git a/config/rootfiles/common/mpage b/config/rootfiles/common/mpage new file mode 100644 index 000000000..9df3083d9 --- /dev/null +++ b/config/rootfiles/common/mpage @@ -0,0 +1,9 @@ +#usr/bin/mpage +#usr/man/man1/mpage.1 +#usr/share/mpage +#usr/share/mpage/CP850.PC +#usr/share/mpage/ISO+STD+OTH +#usr/share/mpage/ISO-8859.1 +#usr/share/mpage/ISO-8859.15 +#usr/share/mpage/ISO-Latin.1 +#usr/share/mpage/ISO-Latin.2 diff --git a/lfs/mpage b/lfs/mpage new file mode 100644 index 000000000..b93fb0634 --- /dev/null +++ b/lfs/mpage @@ -0,0 +1,77 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# # +# This program 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 3 of the License, or # +# (at your option) any later version. # +# # +# This program 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 this program. If not, see . # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 2.5.6 + +THISAPP = mpage-$(VER) +DL_FILE = $(THISAPP).tgz +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = 489663c9246e47915cea931348e5175d + +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) + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/mpage25-config.patch + cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE) + cd $(DIR_APP) && make $(EXTRA_INSTALL) install + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/make.sh b/make.sh index ef98d6fa3..3f8908236 100755 --- a/make.sh +++ b/make.sh @@ -591,6 +591,7 @@ buildipfire() { ipfiremake lzo ipfiremake openvpn ipfiremake pammysql + ipfiremake mpage ipfiremake cups ipfiremake ghostscript ipfiremake foomatic diff --git a/src/patches/mpage25-config.patch b/src/patches/mpage25-config.patch new file mode 100644 index 000000000..fefc54766 --- /dev/null +++ b/src/patches/mpage25-config.patch @@ -0,0 +1,46 @@ +diff -up mpage-2.5.6/Makefile.config mpage-2.5.6/Makefile +--- mpage-2.5.6/Makefile.config 2004-05-30 21:38:31.000000000 +0200 ++++ mpage-2.5.6/Makefile 2009-03-27 11:11:14.652186064 +0100 +@@ -40,7 +40,7 @@ CC=gcc + # See glob.c for all possibilities + # + # PAGESIZE=Letter +-PAGESIZE=A4 ++PAGESIZE=Letter + + # + # Define your spooler type +@@ -50,7 +50,7 @@ PAGESIZE=A4 + SPOOL_TYPE=BSD_SPOOLER + + # PREFIX=e:/usr # OS/2 type +-PREFIX=/usr/local ++PREFIX=/usr + #PREFIX=/usr + BINDIR=$(PREFIX)/bin + LIBDIR=$(PREFIX)/share +@@ -73,7 +73,7 @@ SHEETMARGIN=18 + # + DEFAULT_DUPLEX=0 + +-DEFS = -DPAGE_DEF=\"${PAGESIZE}\" -DLIBDIR=\"${LIBDIR}/mpage\" -DDEFAULT_ENCODING=${ENCODING} -DDEFAULT_DUPLEX=${DEFAULT_DUPLEX} -DDEFAULTSMARGIN=${SHEETMARGIN} -DSPOOLER=${SPOOL_TYPE} # -DKANJI ++DEFS = -DPAGE_DEF=\"${PAGESIZE}\" -DLIBDIR=\"${LIBDIR}/mpage\" -DDEFAULT_ENCODING=${ENCODING} -DDEFAULT_DUPLEX=${DEFAULT_DUPLEX} -DDEFAULTSMARGIN=${SHEETMARGIN} -DSPOOLER=${SPOOL_TYPE} -DKANJI + + + ############################################################################ +@@ -107,7 +107,7 @@ O = .o + # If you are using gcc, you probably don't need to change anything here. + + # Linux: +-CFLAGS = -O2 -s $(DEFS) -Wall ++CFLAGS = $(RPM_OPT_FLAGS) $(DEFS) -Wall + + # AIX (xlC on aix 4): + #CFLAGS = -O2 -s $(DEFS) +@@ -183,5 +183,4 @@ install: + if [ ! -d $(MANDIR) ] ; then mkdir -p $(MANDIR) ; fi + cp mpage$(E) $(BINDIR) + cp mpage.1 $(MANDIR) +- -cp Encodings/* $(LIBDIR)/mpage +- -chmod 644 $(LIBDIR)/mpage/* ++ install -p -m 644 Encodings/* $(LIBDIR)/mpage -- 2.39.2