通过修改 distinfo 和Makefile 文件来安装最新简体中文版的 Adobe Reader7.
OS: freebsd 5.4
******************************
1.修改/usr/ports/print/acroread7下面的distinfo 和Makefile文件。
===================
我的distinfo:
MD5 (acroread/AdobeReader_chs-7.0.0-2.i386.rpm) = 40fe6b8cb157de92090219d4385e3e3e
SIZE (acroread/AdobeReader_chs-7.0.0-2.i386.rpm) = 55386857
=====================
我的Makefile文件
# New ports collection makefile for: acroread7
# Date created: 19 May 2005
# Whom: Trevor Johnson <trevor@freebsd.org>
#
# $FreeBSD: ports/print/acroread7/Makefile,v 1.3 2005/07/07 01:34:00 linimon Exp $
#
PORTNAME= acroread7
PORTVERSION= 7.0.0
CATEGORIES= print linux
MASTER_SITES= http://ardownload.adobe.com/pub/adobe/reader/unix/7x/7.0/chs/ \
ftp://ftp.adobe.com/pub/adobe/reader/unix/7x/7.0/chs/
DISTNAME= AdobeReader_chs-7.0.0-2.i386.rpm
EXTRACT_SUFX=
DIST_SUBDIR= acroread
EXTRACT_ONLY=
RESTRICTED= "Must fill out redistribution form at
http://www.adobe.com/products/acrobat/distribute.html"
MAINTAINER= trevor@FreeBSD.org
COMMENT= View, distribute and print PDF documents
BUILD_DEPENDS= rpm:${PORTSDIR}/archivers/rpm
RUN_DEPENDS= ${LINUXBASE}/usr/lib/libgtk-x11-2.0.so.0:${PORTSDIR}/x11-toolkits/linux-gtk2 \
${LINUXBASE}/usr/lib/libpango-1.0.so.0:${PORTSDIR}/x11-toolkits/linux-pango \
${LINUXBASE}/usr/X11R6/lib/libXext.so.6:${PORTSDIR}/x11/linux-XFree86-libs
CONFLICTS= acroread
ONLY_FOR_ARCHS= amd64 i386
USE_REINPLACE= yes
USE_LINUX?= yes
NO_BUILD= yes
REINPLACE_ARGS= -i '' -E
NO_FILTER_SHLIBS= yes
PLIST= ${WRKDIR}/plist
PREFIX= ${LINUXBASE}
pre-install:
@kldstat -v | ${GREP} -E 'linux(aout|elf)' >/dev/null ||\
{ ${ECHO_MSG} "Linux ABI compatibility must be enabled to install ${PORTNAME}-${PORTVERSION}"; \
exit 1; }
@${RM} -rf ${WRKSRC}/tmp
@${MKDIR} ${WRKSRC}/tmp
cd ${WRKSRC}/tmp; \
rpm2cpio < ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME} | ${CPIO} -id; \
${FIND} * -type f -o -type l > ${PLIST} \
&& ${FIND} -d * -type d | ${SED} -e 's:^:@dirrm :' | \
${GREP} -vE "(usr/bin$$|local$$|share$$|usr$$)" >> ${PLIST}
do-install:
@rpm -U --ignorearch --ignoreos --root ${PREFIX} --dbpath /var/lib/rpm \
--nodeps --replacepkgs ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME} || ${TRUE}
# disable the PPKLite plugin as it requires an LDAP share lib
${CHMOD} 0 ${PREFIX}/usr/local/Adobe/Acrobat7.0/Reader/intellinux/plug_ins/PPKLite.api
post-install:
@${REINPLACE_CMD} 's:Linux:FreeBSD|Linux:g' \
${PREFIX}/usr/local/Adobe/Acrobat7.0/bin/acroread
cd ${LOCALBASE}/bin ; ${LN} -sf ${PREFIX}/usr/local/Adobe/Acrobat7.0/bin/acroread acroread7
cd ${LOCALBASE}/bin ; ${LN} -sf ${PREFIX}/usr/local/Adobe/Acrobat7.0/bin/acroread acroread
@${ECHO_MSG} "Be sure to read the license agreement in"
@${ECHO_MSG} "${PREFIX}/usr/local/Adobe/Acrobat7.0/Reader/Legal/CHS/license_CHS_uc.txt"
.include <bsd.port.mk>
其实修改的地方不多,自己看看就明白。
========================================
2.做完以上两步,就可以到 /usr/ports/print/acroread7下面
make install clean
很快就装完。
============
3.其实我为了方便,先到官方网站把AdobeReader_chs-7.0.0-2.i386.rpm给下了下来,放到 /usr/ports/distfiles/acroread下面。 (只有这样才能知道他的 MD5,否则怎么知道改distinfo文件呢?)
然后才执行第2步的,不到 2分钟就装好,因为不用再去下载原程序。
4.新版打开文件的速度很快