mpage: New package.

Required for foomatic 4.x.
This commit is contained in:
Michael Tremer
2013-10-24 15:12:09 +02:00
parent 78e35c82dc
commit 64c5bbc453
4 changed files with 133 additions and 0 deletions

View File

@@ -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

77
lfs/mpage Normal file
View File

@@ -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 <http://www.gnu.org/licenses/>. #
# #
###############################################################################
###############################################################################
# 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)

View File

@@ -591,6 +591,7 @@ buildipfire() {
ipfiremake lzo
ipfiremake openvpn
ipfiremake pammysql
ipfiremake mpage
ipfiremake cups
ipfiremake ghostscript
ipfiremake foomatic

View File

@@ -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