LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 11675|回复: 56

为爱本编译系统 ( CLFS && CBLFS ^ x86_64-Multilib ^ )

[复制链接]
发表于 2007-9-13 19:26:33 | 显示全部楼层 |阅读模式
为爱本编译系统 ( CLFS && CBLFS ^ x86_64-Multilib ^ )

-------------------------------------------------------------------------------
  9月3日买了台神舟.天运F525R,当天晚上就开始动手给本本做系统了。因为是酷睿2双核64位处理器,我是不会就装个32位的系统的。而纯64位系统似乎还有很多不方便之处,故选择 x86_64 。我做的这个系统是按照 CLFS-SVN-x86_64-Multilib 手册,还有 CBLFS 的方法进行的。反复尝试多次,终于有了个大致的结果,现与大家分享。

  本文内容大致分为以下几个部分:
  1、简介 lfslivecd 的使用方法,以及可从硬盘引导的lfslivecd需要注意的一些问题。
  2、按照CLFS-SVN-x86_64-Multilib手册完成基本系统。( 由于手册软件太新,所以有几个地方略作修改)
  3、参考CBLFS手册,有选择的安装软件。本文中会安装 KDE 桌面环境,因为KDE安装比较容易一些,也较通用。
  4、还没想好。

  主要的参考资料:
  CLFS 手册 :
   http://cross-lfs.org/view/
   http://cross-lfs.org/view/svn/x86_64/

  CBLFS 手册 :
   http://cblfs.cross-lfs.org
   http://cblfs.cross-lfs.org/index.php/Main_Page

  BLFS手册(SVN版)
  http://www.linuxfromscratch.org/blfs/view/svn


  LiveCD (正式版) http://www.linuxfromscratch.org/livecd/download.html
  LiveCD (测试版) http://ums.usu.ru/~patrakov/test/

  在线词典:
  http://dict.cn

  google语言工具:
  www.google.com  点击右边的语言工具

  文中需要使用到的软件以及下载地址:
    CLFS部分:

    CLFS部分需要使用到的软件,这里就不一一列出了。详情请看手册 http://cross-lfs.org/view/svn/x86_64/ ,从 “ All Packages ”
  开始看。手册是全英文的,若有看不懂的朋友还烦请试试 google 的语言工具。我是英语文盲,所以英语的问题我帮不上忙。
    这里提供一个软件包和补丁的下载地址,其实仍然是CLFS网站上的。关于这个软件,因为已发现手册中的 Sysklogd-1.5 按手册中的方法安装
  后会很郁闷。其症状是开机出现一个 klogd 错误,会让系统在七分钟之后才完全启动。新版手册中的 sysklogd-1.5 没有提供补丁解决这个问题,
  所以选择 sysklogd-1.4.1 这个略旧的版本。
    下载地址是CLFS-1.0.0中的。除了sysklogd-1.5 ,它是最新的。
    本文中所以的CLFS需要使用到的软件将被存放在 svn 目录,因为我们做的是CLFS-SVN-x86_64-Multilib,是svn版。
    Sysklogd (1.4.1) - 80 KB:
     Home page: http://www.infodrom.org/projects/sysklogd/
     Download:  http://www.infodrom.org/projects ... sklogd-1.4.1.tar.gz
     MD5 sum: d214aa40beabf7bdb0c9b3c64432c774

    Sysklogd Fixes Patch - 28 KB:
     Download:  http://patches.cross-lfs.org/1.0.0/sysklogd-1.4.1-fixes-1.patch
     MD5 sum: 508104f058d1aef26b3bc8059821935f



    CBLFS部分:
    本文中所有的CBLFS需要使用的软件统一存放在 CBLFS 目录。
    


  CLFS部分目的是为了构建一个基础系统,本文就按照手册上来做了。CLFS完成后,还暂时还不能满足日常工作、学习、娱乐的需要。所以还得继续安装我们需要的软件。


选择安装的软件以及依赖关系列表:
未加说明的,都是先编译一次32位再编译一次64位. 编译方法 以CBLFS手册为准,个别地方与手册不相同。并非所有的包都需要编译一次32位再编译一次64位,这要看需要灵活选择。

################################################################################################
# CLFS-SVN-x86_64-20070923-linux_headers-2.6.22.6-no-kernel
#
$ [ gcc-4.2.1 glibc-2.6.1 binutils-2.18 & sysklogd-1.4.1 ]
################################################################################################

*************************************************
/ Master
===================================
* linux-2.6.22.6 ( reiser4-for-2.6.22-2.patch.gz 可选 )
* pkg-config
* PCI Utilities 64bit
* cpio 64bit
& Linux_PAM 64bit(可选)
* openssl-0.9.8e 64bit
* openssh-4.6p1 64bit
* FUSE-2.7.0 64bit
* Glib-2.14.0
* sshfs-fuse-1.8 64bit
* eject
##################################


*************************************************
/ Console Tools
===================================
* lynx-2.8.6 64bit
* wget-1.10.2 64bit
* gpm-1.20.1
* python
* zhcon-2.5-to-2.6 32bit( 这个选择安装 32 位的, 64位补丁用过后敲五笔时会有退出。 )
. doxygen
* ALSA ( ALSA Library , ALSA Plugins , ALSA Utilities , ALSA Tools , ALSA OSS )
& mpg123
& mplayer ( No-Gui ) 32bit ( 可选 )
& bridge-utils 64bit(可选)
~ unzip 64bit( 建议安装 )
~ unrar ( rar for linux )  
###################################



*************************************************
/ X (X Window System)
===================================
/_/ XORG-7.2
-----------------------------------
* Xorg7.2-Intro
* Xorg7.2 / Protocol_Headers ( Required : pkg-config )
* Xorg7.2 / Utilities ( Required : pkg-config , Protocol Headers )
* FreeType-2.1.10
* expact
* FontConfig-2.4.2 ( Required : FreeType , expat )
* XCB --|
    --* Xcb-proto ( Required : Xorg7 / Intro )
    --* libpthread-stubs ( Required : Xorg7/Intro )
      * LibXML2 ( Required : Python -- /usr/include/python2.5/pyconfig.h )
      * LibXSLT ( Required : LibXML2 )
      * libXau [ from Xorg7/Libraries ]
    --* Libxcb ( Required : xcb-proto , ibpthread-stubs , LibXSLT , libXau from Xorg7/Libraries )
      * Gperf
    --* xcb-utils ( Required : libxcb , Gperf )
* fontconfig-2.4.2 ( Required : FreeType , expat )
* libpng-1.2.18
* Xorg7 / Libraries ( Required : XCB , FreeType , FontConfig )
* Xorg7 / libdrm
* Xorg7 / MesaLib
* Xorg7 / xbitmaps ( Required : Xorg / Utilities )
* Xorg7 / Apps ( Required : Xorg7 / xbitmaps , libpng , MesaLib , FreeType )
  perl Module XML:arser ( Required : Expat )
* Xorg7/Data ( Required : Xorg / Apps , XML:arser )
* Xorg7 / Fonts ( Required : Xorg / Apps , Xorg / Data )
* Xorg7 / Xserver ( Required : Xorg7 / Fonts )
* Xorg7 / Drivers ( Required : Xorg7 / Xserver )
  -- xf86-input-void-X11R7.1-1.1.0.tar.bz2
  -- xf86-input-keyboard-X11R7.2-1.1.1.tar.bz2
  -- xf86-input-mouse-X11R7.2-1.1.2.tar.bz2
  -- xf86-video-vesa-X11R7.2-1.3.0.tar.bz2
  -- xf86-video-vga-X11R7.1-4.1.0.tar.bz2
&  -- xf86-video-i810 ( 此处按自己的显卡来选择 )
  -- xf86-video-chips-X11R7.1-1.1.1.tar.bz2
* Xorg7 / xterm ( Required : libXaw from Xorg / Libraries )
* Xorg7/rman
* Configure X

###################################


*************************************************
/ X Libraries
===================================
* libjpeg
* little cms
* libmng ( Required : libjpeg , little cms )
. NAS
* QT-3.3.8 ( Required : X Window System , libjpeg , libmng )
----------------------------
* Glib2
----------------------------
. atk
. libtiff
. cairo
. pango
* gtk2

###################################


*************************************************
------------------------------------
/ Media and Libraries
------------------------------------
* Audiofile-0.2.6
* esound-0.2.38
~ SDL-1.2.11
~ Libao-0.8.8
* libogg-1.1.3
* libvorbis-1.1.2 ( Required : libogg )
~ nasm-0.99.0.2
~ LibMPEG3-1.7 ( Required : NASM )
* libmad-0.15.1b
~ libquicktime-1.0.0
~ libFAME-0.9.1
~ FLAC-1.2.1
~ Liba52-0.7.4
~ XviD-1.1.3
# ogg123
~* Vorbis Tools-1.1.1 ( Required : libvorbis ) ( Recommended : ogg123 , Curl , libao )
~* lame-3.97
~ Id3lib
~ FAAD2 ( Required : Id3lib )
~ FAAC
~ Theora ( Required : libvorbis )
~ x264
~ ffmpeg-0.4.9-prel
# Avifile-0.7.45 ( 暂时不编译这个软件。它会依赖相同版本的GCC编译的QT3 ,而这个软件包使用 gcc-4.2.1 是无法编译通过的。 )
# libidn-0.6.14 ( Required : Gengetopt ) ( libdts-0.0.2 )
# gstreamer ( gstreamer , gst-plugins-base , gst-plugins-good , gst-plugins-ugly , gst-ffmpeg )
# KPart
-----------------------------------

###################################


*************************************************
/ Desktops/Window Managers
===================================
/ KDE-3.5.7
-----------------------------------
* KDE Pre-Installation Configuration
* aRts ( Required : KDE Pre-Installation Configuration , Qt3 , Glib2 )
* Pcre
* KdeLibs ( Required : aRts , Pcre ) , ( Recommended : libjpeg )
* KdeBase ( Required : KdeLibs )
----------------------------- startx ----------------------------

~ Video Driver

~ opera ( http://www.opera.com )
. Font wqy ( http://wqy.sf.net ; http://wenq.org/ ; http://wqy.sourceforge.net/cgi-bin/index.cgi ; http://wqy.sourceforge.net/cgi-bin/enindex.cgi )
. Kde-i18n ( Required Required : KdeLibs , Font )
-------- Relogin -------
* input method ( SCIM ) 64bit
-----------------------------------

###################################


-----------------------------------
. KdeGraphics
# Akode
# KdeMultimedia
& Mplayer ( GUI ) 32bit
-----------------------------------


*************************************************
. LibIDL
. Zip
* firefox ( Required : Gtk2 , libIDL , Zip )


#Dev86
#IASL
#Xalan-C++

# VirtualBox ( Required : Dev86 , IASL , LibXSLT , Xalan-C++ , Qt3 , libIDL , SDL , ALSA ) ( Optional : GCC-3.3 (Requred for command 'kmk' while compiling) )
-----------------------------------
 楼主| 发表于 2007-9-13 19:27:25 | 显示全部楼层

LiveCD的使用. (使用可引导的iso)

LiveCD的使用. (使用可引导的iso)

特别说明  :关于使用从硬盘引导 ISO 可能的一些故障,已经解决了。方法使用 ro 只读挂载。文中已经改正了,可以放心使用。

提醒:虽然已经可以完美的从硬盘上的 ISO 文件引导 ,但仍然应该至少备一张 lfslivecd 光盘。

复制可引导的ISO到新机器,并为新本的新硬盘添加引导信息.
简介主系统的使用.

新本,只有DOS系而且不能上网。所以,在买本本的时候我就带了一刻录好的光盘去试本。
这张光盘是使用 lfslivecd-x86-6.3-r2052.iso 这个刻录的。
把光盘放入到光驱,重启并设置从光驱启动。LiveCD 启动之后,听到“嘀”的一声提示音,屏幕上出现boot: 提示符。这时可以按F1键,会看到许多提示。根据提示,可以直接敲回车键启动,也可以输入以下内容:
linux vga=792 TZ=Asia/Shanghai UTC=0 LANG=zh_CN.UTF-8
如果想做 64 位系统,可以用64位内核,把前面的linux换成linux64 。 TZ= 后面的是时区,可以换成PRC 。UTC=0是使用本地时间。LANG=zh_CN.UTF-8 是设置字符集编码,这些可以按自己的需要来设置。

分区并设第一主分区为活动分区。我分了三个主分区,分别是:

  1. root@CLFS:~# fdisk -l

  2. Disk /dev/sda: 100.0 GB, 100030242816 bytes
  3. 255 heads, 63 sectors/track, 12161 cylinders
  4. Units = cylinders of 16065 * 512 = 8225280 bytes

  5.    Device Boot      Start         End      Blocks   Id  System
  6. /dev/sda1   *           1        1000     8032468+  83  Linux
  7. /dev/sda2            1001        2500    12048750   83  Linux
  8. /dev/sda3            2501        4500    16065000   83  Linux
  9. /dev/sda4            4501       12161    61536982+   5  Extended
  10. /dev/sda5            4501        4756     2056288+  82  Linux swap / Solaris
  11. /dev/sda6            4757       12161    59480631   83  Linux
复制代码


创建文件系统:
  1. mke2fs -jv /dev/sda1
复制代码


挂载并创建目录:
  1. mkdir -v /media/sda1
  2. mount -v /dev/sda1 /media/sda1
  3. mkdir -pv /media/sda1/boot/grub
复制代码


将光盘保存为ISO :
  1. dd if=/dev/cdrom of=/media/sda1/boot/lfslivecd-x86-6.3-r2052.iso
复制代码


拷贝主系统的GRUB到硬盘BOOT目录:
  1. cp -a /usr/lib/grub/*/* /media/sda1/boot/grub/
复制代码


拷贝 Kernel , initrd :
  1. cp -v /dev/shm/.cdrom/boot/isolinux/linux{,64} \
  2.     /media/sda1/boot/
  3. cp -v /dev/shm/.cdrom/boot/isolinux/initramfs_data.cpio.gz \
  4.     /media/sda1/boot/
复制代码


编辑GRUB引导配置文件:
  1. cat >> /media/sda1/boot/grub/menu.lst << "EOF"
  2. # 64bit kernel
  3. title LFSLIVECD-x86-6.3-r2052 ( 2.6.22.5-64bit iso:/dev/sda1 )
  4. root (hd0,0)
  5. kernel /boot/linux64 vga=792 TZ=Asia/Shanghai UTC=0 LANG=zh_CN.UTF-8 root=iso:/dev/sda1:/boot/lfslivecd-x86-6.3-r2052.iso ro
  6. initrd /boot/initramfs_data.cpio.gz

  7. # 32bit kernel
  8. title LFSLIVECD-x86-6.3-r2052 ( 2.6.22.5-32bit iso:/dev/sda1 )
  9. root (hd0,0)
  10. kernel /boot/linux vga=792 TZ=Asia/Shanghai UTC=0 LANG=zh_CN.UTF-8 root=iso:/dev/sda1:/boot/lfslivecd-x86-6.3-r2052.iso ro
  11. initrd /boot/initramfs_data.cpio.gz
  12. EOF
复制代码


添加引导信息:
grub

GRUB 命令模式下将引导写到MBR
root (hd0,0)
setup (hd0)

quit

重启并尝试从硬盘引导系统:
cd
umount /dev/sda1
reboot

改过BIOS设置之后,尝试从硬盘引导个ISO的LINUX系统。

当然,也可以使用 lfslivecd-x86_64-6.3-r2014.iso 。而事实上两个我都用了。需要注意的是在拷贝 linux 和 initramfs_data.cpio.gz 的时候,名称不应与已有的x86的相同且要注意 menu.lst 文件的内容,否则可能会出现不能正常引导的情况。

LiveCD 在图形下使用 vi 编译文件退出之后可能会出现乱码,这时 敲 reset 这几个字母就可以了。注意,大写锁定键不要打开了。

特别说明  :关于使用从硬盘引导 ISO 可能的一些故障,已经解决了。方法使用 ro 只读挂载。文中已经改正了,可以放心使用。

2007年九月16日补充:
目前的 lfslivecd 从硬盘启动 ISO 文件需要特别特别注意!一定要弄对,否则后果十分严重!
综合最近四次数据丢失(台式机三次,笔记本今日发生一次),我可以断定当已载入lfslivecd的 kernel 和 initrd 无法找到和挂载某硬盘分区上的 ISO 的时候,很有可能会发生悲剧!!当你发现不能正常启动的时候,当你按下 Ctrl + ALT + Del 的时候,可能此分区上的文件已经被删除掉一部分了。如果,你看到它无法正常启动,还在耐心的等待,可能将删除完此分区上的所有文件。
20070916今天当我将 /dev/sda1 分区上的 /boot 移到 /dev/sda3 分区上之后,接着就在 /dev/sda1 分区上做了一次CLFS 。当我想从硬盘启动 ISO 时,我从 GRUB 编译模式中改 root (hd0,0) 为 root (hd0,2) 。但是 那段 kernel 后面的 /dev/sda1 忘了改成 /dev/sda3 了。这样就启动失败了。我只好按 Ctrl + Alt + Del 重启。接着就在GRUB启动画面看到了 ERROR ,我断定 第一主分区 /dev/sda1 上在的 /boot/grub 目录可能已经不存在了。当我从光盘启动之后,发现此分区根目录下已经丢失了几个重要的系统目录。
另外,那个存放 ISO 的分区肯定是要先挂载的,它挂载到了什么地方呢? 我仔细找了下,发现就在 /dev/shm/.partition/ 目录下。你可以想想这有多危险!?

20070916下午14:32补充:
可喜的是已经有了阻止灾难发生的办法,那就是使用 ro 只读挂载。上文中的已经改正了。
我们只需要在启动时使用 ro 参数就可以只读挂载那个将要被挂载的分区。然后无论这个分区上是否有我们需要的 ISO 文件,都不会对此分区数据造成破坏。除非是故意的去破坏,比如删分区,格式化等操作.

本文中由于是做 x86_64 的64位系统,应该使用 64 位的内核。我将iso文件移到了第三主分区。再次重申,ISO隐患已经解决,方法是用 ro 只读挂载存放iso文件的分区。这是我的 /boot/grub/menu.lst 文件:
  1. # Begin /boot/grub/menu.lst

  2. # By default boot the first menu entry.
  3. default 0

  4. # Allow 30 seconds before booting the default.
  5. timeout 30

  6. # Use prettier colors.
  7. color green/black light-green/black

  8. # The first entry is for CLFS.
  9. title CLFS SVN-20070921-x86_64-Multilib ( 2.6.22.6-64bit /dev/sda1 ext3 )
  10. root (hd0,0)
  11. kernel /boot/clfskernel-2.6.22.6 vga=792 root=/dev/sda1

  12. # The first entry is for CLFS.
  13. title CLFS SVN-20070902-x86_64-Multilib ( 2.6.22.6-64bit /dev/sda2 ext3 )
  14. root (hd0,1)
  15. kernel /boot/clfskernel-2.6.22.6 vga=792 root=/dev/sda2

  16. # The first entry is for CLFS.LiveCD
  17. title LFSLIVECD-x86-6.3-r2052 ( 2.6.22.5-64bit iso:/dev/sda1 )
  18. root (hd0,2)
  19. kernel /boot/linux64 vga=792 TZ=Asia/Shanghai UTC=0 LANG=zh_CN.UTF-8 root=iso:/dev/sda3:/boot/lfslivecd-x86-6.3-r2052.iso ro
  20. initrd /boot/initramfs_data.cpio.gz

  21. # The first entry is for CLFS.LiveCD
  22. title LFSLIVECD-x86_64-6.3-r2014 ( 2.6.22.1-64bit iso:/dev/sda1 )
  23. root (hd0,2)
  24. kernel /boot/linux-x86_64 vga=792 TZ=Asia/Shanghai UTC=0 LANG=zh_CN.UTF-8 root=iso:/dev/sda3:/boot/lfslivecd-x86_64-6.3-r2014.iso ro
  25. initrd /boot/initramfs_data-x86_64.cpio.gz
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-9-13 19:28:07 | 显示全部楼层

新版 CLFS 手册需要注意的几个问题

构建基础系统
  CLFS-svn-x86_64-Multilib 手册中发现一处错误、一处笔误、另外还有一处因为软件问题引起的系统启动的 klogd 错误会延时七分钟出现登录提示。CLFS手册从9月3日2点钟左右,更新了一次。这次更新,是一次“大跃进” 。linux内核及头文件从原先的 2.6.20.1 换成了 2.6.22.5 ,如果我记得不错udev 从 105 直接换到了 115 。现在是20070925了,从9月3日到9月25日,手册中的几处错误一直没有改正。

这几处错误是:


[错误一]

手册第八章," 8.2. E2fsprogs-1.40.2 " ,这里有一处错误。手册第十章 “ 10.67. Udev-115 64 Bit” 有一处笔误。
会导致目标系统启动不正常。现在已经有了解决的方法:
做CLFS-svn-x86_64 第8章时mount出错的解决方法 ( 感谢 echo 提供 )
http://linuxsir.cn/bbs/showthread.php?t=312181

手册中有错的地方是这里:
http://cross-lfs.org/view/svn/x86_64/chroot/e2fsprogs.html
在编译 E2fsprogs-1.40.2 的时候,改成这样做:
这是 echo 提出来的,我就直接复制过来了。新版手册中的确有两处错误。

  1. cp -v configure{,.orig}
  2. sed -e "/libdir=.*\/lib/s@/lib@/lib64@g" configure.orig > configure
  3. mkdir -v build
  4. cd build
  5. CC="${CC} ${BUILD64}" ../configure --prefix=/tools \
  6.     --enable-elf-shlibs --disable-evms --with-cc="${CC} ${BUILD64}" \
  7.     --with-linker=${LD} --host=${CLFS_TARGET}
  8. make libs
  9. make install-libs
复制代码


做CLFS的时候,一定要注意把手册下载到硬盘。
我是这样做的:
mkdir CLFS-BOOK-SVN-HTML
wget -rcnp http://cross-lfs.org/view/svn/

做完CLFS之后,应该把手册的目录拷贝到目标系统中,然后再将系统打包备份。


[错误二]

http://cross-lfs.org/view/svn/x86_64/final-system/sysklogd.html
系统做好后,启动故障,klogd 错误,等待七分钟才出现登录提示。
解决办法 :
将sysklogd-1.5换成 1.4.1 的。


[错误三]

udev-115 64bit 的问题已经解决了。more README 之后,得到了我想要的答案。
( 20070915 下午2点57分)

手册中这样写的,这是一处笔误:
  1. make CC="gcc ${BUILD64}" LD="gcc ${BUILD64}" \
  2.     EXTRAS="extras/ata_id extras/cdrom_id extras/collect
  3.     extras/edd_id extras/firmware extras/floppy extras/path_id extras/rule_generator
  4.     extras/scsi_id extras/usb_id extras/volume_id" udevdir=/dev
复制代码

详见
http://cross-lfs.org/view/svn/x86_64/final-system/udev-64bit.html

我是这样做的:

  1. make CC="gcc ${BUILD64}" LD="gcc ${BUILD64}"  \
  2.     EXTRAS="$(echo extras/*)" udevdir=/dev
复制代码

  1. make  DESTDIR=/  EXTRAS="$(echo extras/*)" install
复制代码

余下部分的同手册。
手册中的做法是忘了加 \
换行。所以出错。把手册上每行换行处都加上 \
就可以了。

这个 Udev-115 还有一些问题。我的解决方是从 lfslivecd-x86_64-6.3-r2014.iso 这个系统中拷贝 文件。

  1. cp -a /lib64/udev/devices ${CLFS}/lib64/udev/
  2. chmod +x  /lib64/udev/rule_generator.functions
复制代码

/lib/udev/devices 不用拷贝了。

新版手册中没有创建 /etc/mtab 文件, 自己建一个 touch /etc/mtab
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-9-13 19:28:48 | 显示全部楼层

CBLFS部分 ( 几个常见软件的安装 )

  CLFS完成之后,还只是一个基础系统,很多事情都做不了.当然,也还不能满足我的需要.所以还需要继续安装软件.我选择先安 装一些比较常见比较有用的软件.

  0101-PCI_Utilities-64bit
  1. cd /sources
  2. tar xf /CBLFS/pciutils-2.2.6.tar.bz2
  3. cd pciutils-2.2.6
  4. sed -i 's/null ;/null 2>\&1 ;/' update-pciids.sh &&
  5. make PREFIX=/usr LIBDIR=/usr/lib64 CC="gcc ${BUILD64}" ZLIB=no
  6. make PREFIX=/usr LIBDIR=/usr/lib64 install
  7. make PREFIX=/usr LIBDIR=/usr/lib64 install-lib
  8. cd ..
  9. rm -rf pciutils-2.2.6
复制代码

  0102-cpio-64bit
  1. cd /sources
  2. tar xf /CBLFS/cpio-2.9.tar.bz2
  3. CC="gcc ${BUILD64}" ./configure CPIO_MT_PROG=mt --prefix=/usr --libdir=/usr/lib64 \
  4.     --bindir=/bin --libexecdir=/tmp \
  5.     --with-rmt=/usr/sbin/rmt &&
  6. make
  7. make install
  8. cd ..
  9. rm -rf cpio-2.9
复制代码

  0103-pkg-config-x86_64
  1. cd /sources
  2. tar xvf /CBLFS/pkg-config-0.22.tar.gz
  3. cp -a pkg-config-0.22{,-64}
  4. # 32bit
  5. cd pkg-config-0.22
  6. #    Compile the package:
  7. CC="gcc ${BUILD32}" ./configure --prefix=/usr --with-pc-path=/usr/share/pkgconfig &&
  8. make
  9. #   Install the package
  10. make install
  11. mv -v /usr/bin/pkg-config{,-32}
  12. # 64bit
  13. cd ../pkg-config-0.22-64
  14. #    Compile the package:
  15. CC="gcc ${BUILD64}" ./configure --prefix=/usr --with-pc-path=/usr/share/pkgconfig &&
  16. make
  17. #   Install the package
  18. make install
  19. cd /sources
  20. rm -rf pkg-config-0.22{,-64}
  21. cat > /etc/profile << "EOF"
  22. # Begin /etc/profile
  23. # Based on the profile scripts in BLFS http://www.linuxfromscratch.org/blfs/view/svn/postlfs/profile.html
  24. for script in /etc/profile.d/*.sh
  25. do
  26.   source $script
  27. done
  28. unset script
  29. # End /etc/profile.d
  30. EOF
  31. install -d -m755 /etc/profile.d
  32. cat > /etc/profile.d/10-pkg_config_path.sh << "EOF"
  33. # Begin /etc/profile.d/10-pkg_config_path.sh
  34. export PKG_CONFIG_PATH32="/usr/lib/pkgconfig"
  35. export PKG_CONFIG_PATHN32="/usr/lib32/pkgconfig"
  36. export PKG_CONFIG_PATH64="/usr/lib64/pkgconfig"
  37. # End /etc/profile.d/10-pkg_config_path.sh
  38. EOF
  39. source /etc/profile
复制代码
  注意: 上面的 source /etc/profile 这条命令一定要手工敲入。

  0104-openSSL-64bit
  1. cd /sources
  2. tar xf /CBLFS/openssl-0.9.8e.tar.gz
  3. # 64bit
  4. #cd ../openssl-0.9.8e-64
  5. # This patch allows OpenSSL to be installed into a dir other then lib:
  6. patch -Np1 -i /CBLFS/openssl-0.9.8e-allow_lib64-1.patch
  7. # Apply patch to correct GCC-4.2.0 problems:
  8. patch -Np1 -i /CBLFS/openssl-0.9.8e-gcc42_fix-1.patch
  9. # Configure the Package (Use the appropriate command):
  10. ./Configure linux-x86_64 --openssldir=/etc/ssl --prefix=/usr shared
  11. # Compile the package:
  12. USE_ARCH=64 make CC="gcc ${BUILD64}" PERL=/usr/bin/perl LIBDIR=lib64
  13. # Install the package:
  14. USE_ARCH=64 make PERL=/usr/bin/perl MANDIR=/usr/share/man LIBDIR=lib64 install
  15. #
  16. cd ..
  17. rm -rf openssl-0.9.8e{,-64}
复制代码

  0105-OpenSSH-64bit
  1. #  OpenSSH User/Group & PrivSep Dir
  2. groupadd -g 48 sshd &&
  3. useradd -c 'sshd PrivSep' -d /var/lib/sshd -g sshd -s /bin/false -u 48 sshd &&
  4. install -v -m700 -d /var/lib/sshd &&
  5. chown -v root:sys /var/lib/sshd
  6. cd /sources
  7. tar xf /CBLFS/openssh-4.6p1.tar.gz
  8. cd openssh-4.6p1
  9. CC="gcc ${BUILD64}" ./configure --prefix=/usr --sysconfdir=/etc/ssh \
  10.     --libexecdir=/usr/sbin --with-md5-passwords \
  11.     --with-privsep-path=/var/lib/sshd &&
  12. make
  13. make install &&
  14. install -v -m755 -d /usr/share/doc/openssh-4.6p1 &&
  15. install -v -m644 INSTALL LICENCE OVERVIEW README* WARNING.RNG \
  16. /usr/share/doc/openssh-4.6p1
  17. cd ..
  18. rm -rf openssh-4.6p1{,-64}
  19. # Configuring
  20. # BootScript
  21. #Install the init script included in the blfs-bootscripts package.
  22. tar xf /CBLFS/blfs-bootscripts-20060910.tar.bz2
  23. cd blfs-bootscripts-20060910
  24. make install-sshd
复制代码

  0106-glib-2
  1. #Required
  2. #     * pkg-config
  3. cd /sources
  4. # ftp://ftp.gtk.org/pub/glib/2.12/glib-2.14.0.tar.bz2
  5. tar xvf /CBLFS/glib-2.14.0.tar.bz2
  6. cp -a glib-2.14.0{,-64}
  7. # 32bit
  8. cd glib-2.14.0
  9. #   Compile the package:
  10. CC="gcc ${BUILD32}" ./configure --prefix=/usr --host=${CLFS_TARGET32} &&
  11. make
  12. #   Install the package
  13. make install
  14. # find /usr/bin/{glib-genmarshal,glib-gettextize,glib-mkenums,gobject-query} -exec mv -v {} {}-32 \;
  15. # 64bit
  16. cd ../glib-2.14.0-64
  17. #   Compile the package:
  18. CC="gcc ${BUILD64}" ./configure --prefix=/usr --libdir=/usr/lib64 &&
  19. make
  20. #   Install the package
  21. make install
  22. cd ..
  23. rm -rf glib-2.14.0{,-64}
复制代码

  0107-FUSE-64bit
  这个包被SSHFS依赖。编译FUSE需要Linux kernel source , 如果在编译内核后删除了源码目录,需要重建源码目录,没有必要再编译一次内核。
  1. # Required : Linux kernel source
  2. cd /sources
  3. tar xf /CBLFS/fuse-2.7.0.tar.gz
  4. cd fuse-2.7.0
  5. CC="gcc ${BUILD64}" ./configure --prefix=/usr \
  6.     --libdir=/usr/lib64 --with-kernel=/lib64/modules/$(uname -r)/source &&
  7. make
  8. make install
  9. cd ..
  10. rm -rf fuse-2.7.0
复制代码


  0108-SSHFS-64bit
  这个软件很方便。我的台式机和笔记本拷贝文件就靠它了。
  1. cd /sources
  2. tar xf /CBLFS/sshfs-fuse-1.8.tar.gz
  3. cd sshfs-fuse-1.8
  4. PKG_CONFIG_PATH="$PKG_CONFIG_PATH64" CC="gcc ${BUILD64}" \
  5.     ./configure --prefix=/usr
  6. make
  7. make install
  8. cd ..
  9. rm -rf sshfs-fuse-1.8
复制代码

  0109-eject-64bit
  这个软件用来控制光驱托盘的进/出。
  1. cd /sources
  2. tar xf /CBLFS/eject-2.1.5.tar.gz
  3. # 64bit
  4. cd eject
  5. CC="gcc ${BUILD64}" ./configure --prefix=/usr &&
  6. make
  7. make install
  8. cd ..
  9. rm -rf eject
复制代码

  0110-wget-64bit
  1. cd /sources
  2. tar xvf /CBLFS/wget-1.10.2.tar.gz
  3. cd wget-1.10.2
  4. CC="gcc ${BUILD64}" ./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64 &&
  5. make
  6. make install
  7. cd ..
  8. rm -rf wget-1.10.2{,-64}
复制代码

  0111-GPM
  1. cd /sources
  2. tar xvf /CBLFS/gpm-1.20.1.tar.bz2
  3. cp -a gpm-1.20.1{,-64}
  4. # 32bit
  5. cd gpm-1.20.1
  6. patch -Np1 -i /CBLFS/gpm-1.20.1-segfault-1.patch &&
  7. patch -Np1 -i /CBLFS/gpm-1.20.1-silent-1.patch &&
  8. CC="gcc ${BUILD32}" ./configure --prefix=/usr --sysconfdir=/etc &&
  9. LDFLAGS="-lm" make
  10. make install &&
  11. ldconfig
  12. mv -v /usr/sbin/gpm{,-32}
  13. #
  14. # 64bit
  15. cd ../gpm-1.20.1-64
  16. patch -Np1 -i /CBLFS/gpm-1.20.1-segfault-1.patch
  17. patch -Np1 -i /CBLFS/gpm-1.20.1-silent-1.patch
  18. CC="gcc ${BUILD64}" ./configure --prefix=/usr --sysconfdir=/etc \
  19.     --libdir=/usr/lib64 &&
  20. LDFLAGS="-lm" make
  21. make install &&
  22. cp -v conf/gpm-root.conf /etc &&
  23. ldconfig
  24. cd ..
  25. rm -rf gpm-1.20.1{,-64}
  26. #  BootScript
  27. #tar xvf /CBLFS/blfs-bootscripts-20060910.tar.bz2
  28. cd blfs-bootscripts-20060910
  29. make install-gpm
  30. # configuration information
  31. cat > /etc/sysconfig/mouse << "EOF"
  32. # Begin /etc/sysconfig/mouse
  33. MDEVICE="/dev/psaux"
  34. PROTOCOL="imps2"
  35. GPMOPTS=""
  36. # End /etc/sysconfig/mouse
  37. EOF
  38. /etc/rc.d/init.d/gpm start
复制代码

  0112-zhcon-0.2.5-to-0.2.6-32bit
  Linux中的ucdos,不用启图形就可以使用中文了。因为64位还有些问题,所以这里暂时安装32位的用用。zhcon 默认是 gb2312 编码,打过0.2.6补丁的支持utf8,可以在字符环境下敲入 zhcon --utf8 启动 。
  1. cd /sources
  2. tar xvf /CBLFS/zhcon-0.2.5.tar.gz
  3. cd zhcon-0.2.5
  4. zcat /CBLFS/zhcon-0.2.5-to-0.2.6.diff.gz | patch -p1
  5. # 32bit
  6. CC="gcc ${BUILD32}" CXX="g++  ${BUILD32}"  \
  7.     ./configure --prefix=/usr --sysconfdir=/etc/zhcon
  8. make
  9. make install
  10. mv -v /usr/bin/zhcon{,-32}
复制代码

  0113-unzip
  1. cd /sources
  2. tar xf /CBLFS/unzip552.tar.gz
  3. cd unzip-5.52
  4. make -f unix/Makefile LOCAL_UNZIP=-D_FILE_OFFSET_BITS=64 \
  5.     CC="gcc ${BUILD64}" LD='$(CC)' CF="-O -Wall -I. -DUSE_UNSHRINK" \
  6.     unzips
  7. make -f unix/Makefile prefix=/usr install
  8. cd ..
  9. rm -rf unzip-5.52
复制代码

  0114-rar-for-linux
  1. #Non-Multilib
  2. tar xf /CBLFS/rarlinux-3.7.1.tar.gz
  3. cd rar
  4. sed -i -e "s/\/local//"  Makefile
  5. make install
  6. cd ..
  7. rm -rf rar
复制代码

  0115-python
  1. cd /sources
  2. tar xvf /CBLFS/Python-2.5.tar.bz2
  3. cp -a Python-2.5{,-64}
  4. # 32Bit
  5. cd Python-2.5
  6. #   Compile the package:
  7. patch -Np1 -i /CBLFS/Python-2.5-gdbm-1.patch &&
  8. CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" ./configure --prefix=/usr \
  9.     --enable-shared &&
  10. make EXTRA_CFLAGS="-fwrapv"
  11. #   Install the package
  12. make install &&
  13. mv -v /usr/bin/python{,-32} &&
  14. mv -v /usr/bin/python2.5{,-32} &&
  15. mv -v /usr/include/python2.5/pyconfig{,-32}.h
  16. # 64Bit
  17. cd ../Python-2.5-64
  18. #   Change the libdir that Python is going to use to lib64:
  19. patch -Np1 -i /CBLFS/Python-2.5-multilib-1.patch
  20. sed -i -e "s:@@MULTILIB_DIR@@:lib64:g" \
  21.         Lib/distutils/command/install.py \
  22.         Lib/distutils/sysconfig.py \
  23.         Lib/site.py \
  24.         Makefile.pre.in \
  25.         Modules/Setup.dist \
  26.         Modules/getpath.c \
  27.         setup.py
  28. #   Compile the package:
  29. patch -Np1 -i /CBLFS/Python-2.5-gdbm-1.patch &&
  30. CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" ./configure --prefix=/usr \
  31.     --libdir=/usr/lib64 --enable-shared &&
  32. make EXTRA_CFLAGS="-fwrapv"
  33. #   Install the package
  34. make install &&
  35. mv -v /usr/bin/python{,-64} &&
  36. mv -v /usr/bin/python2.5{,-64} &&
  37. ln -sfv multiarch_wrapper /usr/bin/python &&
  38. ln -sfv multiarch_wrapper /usr/bin/python2.5 &&
  39. mv -v /usr/include/python2.5/pyconfig{,-64}.h
  40. cd /sources
  41. rm -rf Python-2.5{,-64}
  42. # 这里选择通用的。详情请看CBLFS手册。
  43. # Creating a Generic Stub Header
  44. cat > /usr/include/python2.5/pyconfig.h << "EOF"
  45. /* pyconfig.h - Stub Header  */
  46. #ifndef __STUB__PYCONFIG_H__
  47. #define __STUB__PYCONFIG_H__
  48. #if defined(__x86_64__) || \
  49.     defined(__sparc64__) || \
  50.     defined(__arch64__) || \
  51.     defined(__powerpc64__) || \
  52.     defined (__s390x__)
  53. # include "pyconfig-64.h"
  54. #else
  55. # include "pyconfig-32.h"
  56. #endif
  57. #endif /* __STUB__PYCONFIG_H__ */
  58. EOF
复制代码

  0116-doxygen
  1. cd /sources
  2. tar xvf /CBLFS/doxygen-1.5.3.src.tar.gz
  3. cp -a doxygen-1.5.3{,-64}
  4. # 32Bit
  5. cd doxygen-1.5.3
  6. #   Compile the package:
  7. CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" ./configure --prefix /usr --docdir /usr/share/doc &&
  8. make
  9. #   Install the package
  10. make install
  11. mv -v /usr/bin/doxygen{,-32}
  12. # 64Bit
  13. cd ../doxygen-1.5.3-64
  14. #   Compile the package:
  15. CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" ./configure --prefix /usr --docdir /usr/share/doc &&
  16. make
  17. #   Install the package
  18. make install
  19. #If you wish to generate and install the package documentation (note   that man pages have already been installed), you must have Python, teTeX (for HTML docs) and Ghostscript (for PDF docs) installed, then  issue the following command:
  20. #这里不需要:
  21. #make install_docs
  22. cd /sources
  23. rm -rf doxygen-1.5.3{,-64}
复制代码

  0117-alsa-lib
  安装了这么多软件,还没有安装图形,心情很郁闷。现在把alsa装上,把mpg123安装上,然后拷贝几个mp3过来听听。
  1. cd /sources
  2. tar xvf /CBLFS/alsa-lib-1.0.14.tar.bz2
  3. cp -a alsa-lib-1.0.14{,-64}
  4. # 32Bit
  5. cd alsa-lib-1.0.14
  6. #   Compile the package:
  7. CC="gcc ${BUILD32}" ./configure &&
  8. make
  9. #   Install the package
  10. make install
  11. # 64Bit
  12. cd ../alsa-lib-1.0.14-64
  13. #   Compile the package:
  14. CC="gcc ${BUILD64}" ./configure --libdir=/usr/lib64 &&
  15. make
  16. #   Install the package
  17. make install &&
  18. install -v -m644 -D doc/asoundrc.txt \
  19.     /usr/share/doc/alsa-lib-1.0.14/asoundrc.txt
  20. cd ..
  21. rm -rf alsa-lib-1.0.14{,-64}
复制代码

  0118-alsa-plugins
  1. cd /sources
  2. tar xvf /CBLFS/alsa-plugins-1.0.14.tar.bz2
  3. cp -a alsa-plugins-1.0.14{,-64}
  4. # 32Bit
  5. cd alsa-plugins-1.0.14
  6. #  Compile the package:
  7. CC="gcc ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" ./configure &&
  8. make
  9. #   Install the package
  10. make install
  11. #cd /sources
  12. #tar xvf /CBLFS/alsa-plugins-1.0.14.tar.bz2
  13. # 64Bit
  14. cd ../alsa-plugins-1.0.14-64
  15. #   Compile the package:
  16. CC="gcc ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" ./configure --libdir=/usr/lib64 &&
  17. make
  18. #   Install the package
  19. make install &&
  20. install -v -m755 -d /usr/share/doc/alsa-plugins-1.0.14 &&
  21. install -v -m644 doc/{README*,*.txt} \
  22.                     /usr/share/doc/alsa-plugins-1.0.14
  23. cd /sources
  24. rm -rf alsa-plugins-1.0.14{,-64}
复制代码

  0119-alsa-utilities
  1. cd /sources
  2. tar xvf /CBLFS/alsa-utils-1.0.14.tar.bz2
  3. cp -a alsa-utils-1.0.14{,-64}
  4. # 32Bit
  5. cd alsa-utils-1.0.14
  6. #   Compile the package:
  7. CC="gcc ${BUILD32}" ./configure &&
  8. make
  9. #   Install the package
  10. make install
  11. # 64Bit
  12. #   Compile the package:
  13. cd ../alsa-utils-1.0.14-64
  14. CC="gcc ${BUILD64}" ./configure &&
  15. make
  16. #   Install the package
  17. make install
  18. cd /sources
  19. rm -rf alsa-utils-1.0.14{,-64}
  20. #  Configuration Information
  21. #
  22. #  Use a bootscript to store the values at shutdown.
  23. cd /sources/blfs-bootscripts-20060910/
  24. make install-alsa
  25. # The first time the alsactl program is run from the udev rule below, it will complain that there is no state in /etc/asound.state. You can prevent this by running the following commands as the root user:
  26. [color=red]
  27. #touch /etc/asound.state &&
  28. #alsactl store
  29. [/color]
  30. # As the root user, install a new Udev rules file to create the audio device nodes and run the restore script:
  31. cat > /etc/udev/rules.d/15-alsa.rules << "EOF"
  32. # Give the audio group ownership of sound devices
  33. SUBSYSTEM=="sound",       GROUP="audio"
  34. SUBSYSTEM=="snd",         GROUP="audio"
  35. # ALSA Devices
  36. # When a sound device is detected, restore the volume settings
  37. KERNEL=="controlC[0-9]*",  NAME="snd/%k", ACTION=="add", RUN+="/usr/sbin/alsactl restore %n"
  38. KERNEL=="hw[CD0-9]*",      NAME="snd/%k"
  39. KERNEL=="pcm[CD0-9cp]*",   NAME="snd/%k"
  40. KERNEL=="midiC[D0-9]*",    NAME="snd/%k"
  41. KERNEL=="timer",           NAME="snd/%k"
  42. KERNEL=="seq",             NAME="snd/%k"
  43. EOF
  44. chmod 644 /etc/udev/rules.d/15-alsa.rules
  45. udevtrigger /etc/udev/rules.d/15-alsa.rules
复制代码

  现在可以尝试运行 alsamixer 命令,调节音量大小了。m键是打开/关闭声音,上下光标键是调节大小,左右方向键移动,Esc或Ctrl加C键可以退出。

  0120-alsa-tools
  1. cd /sources
  2. tar xvf /CBLFS/alsa-tools-1.0.14.tar.bz2
  3. cp -a alsa-tools-1.0.14{,-64}
  4. # 32Bit
  5. cd alsa-tools-1.0.14
  6. cd ac3dec
  7. #   Apply the following patch in the top-level directory of alsa-tools before building ac3dec:
  8. #patch -Np1 -i /CBLFS/alsa-tools-1.0.14-ac3dec_config_update-1.patch
  9. #   Compile each package with:
  10. CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" USE_ARCH=32 PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
  11. ./configure --prefix=/usr &&
  12. make
  13. #   Install each package with:
  14. make install
  15. # 64Bit
  16. cd ../../alsa-tools-1.0.14-64
  17. cd ac3dec
  18. #   Apply the following patch in the top-level directory of alsa-tools before building ac3dec:
  19. #patch -Np1 -i /CBLFS/alsa-tools-1.0.14-ac3dec_config_update-1.patch
  20. #   Before building qlo10k1 apply the following sed so it looks in the correct dir for libraries:
  21. sed -i "s@QTDIR/lib@&64@g" configure
  22. #   Compile each package with:
  23. CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" USE_ARCH=64 PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
  24. ./configure --prefix=/usr --libdir=/usr/lib64 &&
  25. make
  26. #   Install each package with:
  27. make install
  28. cd /sources
  29. rm -rf alsa-tools-1.0.14{,-64}
复制代码

  0121-alsa-oss
  1. cd /sources
  2. tar xvf /CBLFS/alsa-oss-1.0.14.tar.bz2
  3. cp -a alsa-oss-1.0.14{,-64}
  4. # 32Bit
  5. cd alsa-oss-1.0.14
  6. #   Compile the package:
  7. CC="gcc ${BUILD32}" ./configure &&
  8. make
  9. #   Install the package
  10. make install
  11. # 64Bit
  12. cd ../alsa-oss-1.0.14-64
  13. #   Compile the package:
  14. CC="gcc ${BUILD64}" ./configure --libdir=/usr/lib64 &&
  15. make
  16. #  Install the package
  17. make install
  18. cd /sources
  19. rm -rf alsa-oss-1.0.14{,-64}
复制代码

  0122-mpg123
  1. #Required
  2. #     * ALSA OSS or OSS kernel Support
  3. cd /sources
  4. tar xvf /CBLFS/mpg123-0.67.tar.bz2
  5. cp -a mpg123-0.67{,-64}
  6. # 32Bit
  7. cd mpg123-0.67
  8. #   Configure and compile the package:
  9. CC="gcc ${BUILD32}" ./configure --prefix=/usr &&
  10. make
  11. make install
  12. mv -v /usr/bin/mpg123{,-32}
  13. # 64bit
  14. cd ../mpg123-0.67-64
  15. CC="gcc ${BUILD64}" ./configure --prefix=/usr &&
  16. make
  17. make install
  18. cd ..
  19. rm -rf mpg123-0.67{,-64}
复制代码

  如果硬盘上有mp3音乐,现在就可以用 mpg123 xxx.mp3 来播放mp3音乐了,可以使用通配符“ * ”号。
  前面安装过openSSH 和 sshfs 了,所以这安装过openSSH之后,我就启用 ssh 服务从台式机登录到笔记本进行编译安装软件了。sshfs这个软件挺好用的,两台机器只需要用交叉线连接,配一下IP地址就可以了传送文件了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-9-13 19:29:31 | 显示全部楼层

编译安装一个简单的 KDE 桌面环境 ( xorg-7.2 + qt-3.3.8 + kde-3.5.7 )

Xorg-7.2 的安装过程

---------------------------------------------------------------------------------
  0200-Xorg7.2_Download
  这里先下载 Xorg7.2的源码包。到 /CBLFS/xorg-7.2/ 和 /CBLFS/ 目录。其中,/CBLFS/xorg-7.2/ 目录将会 cp -a 拷贝到 /sources/ 目录下,方便使用半自动化脚本安装。
  1. cd /CBLFS
  2. # 此处注意看手册。
  3. mkdir xorg-7.2 &&
  4. cd xorg-7.2
  5. install -dv {app,data,driver,font,lib,proto,util}
  6. # DOWNLOAD :
  7. # Xorg7/Protocol Headers
  8. .............................
复制代码

  0201-Intro
  1. # Xorg7.2  Multilib ( x86_64 )
  2. export XORG_PREFIX=/usr/X11R7
  3. # XORG_CONFIG
  4. export XORG_CONFIG32="--prefix=$XORG_PREFIX --sysconfdir=/etc --localstatedir=/var"
  5. export XORG_CONFIGN32="--prefix=$XORG_PREFIX --libdir=$XORG_PREFIX/lib32 --sysconfdir=/etc --localstatedir=/var"
  6. export XORG_CONFIG64="--prefix=$XORG_PREFIX --libdir=$XORG_PREFIX/lib64 --sysconfdir=/etc --localstatedir=/var"
  7. # ld.so.conf
  8. # If your XORG_PREFIX is anything other than /usr you need to add the following to /etc/ld.so.conf so your libraries can be found.
  9. cat >> /etc/ld.so.conf << EOF
  10. # Begin Xorg addition to /etc/ld.so.conf
  11. ${XORG_PREFIX}/lib
  12. ${XORG_PREFIX}/lib32
  13. ${XORG_PREFIX}/lib64
  14. # End Xorg addition to /etc/ld.so.conf
  15. EOF
  16. # Bash Startup Files
  17. # /etc/profile
  18. cat > /etc/profile << "EOF"
  19. # Begin /etc/profile
  20. # Based on the profile scripts in BLFS http://www.linuxfromscratch.org/blfs/view/svn/postlfs/profile.html
  21. for script in /etc/profile.d/*.sh
  22. do
  23.   source $script
  24. done
  25. unset script
  26. # End /etc/profile.d
  27. EOF
  28. install -d -m755 /etc/profile.d
  29. # 15-xorg.sh
  30. cat > /etc/profile.d/15-xorg.sh << "EOF"
  31. # Begin /etc/profile.d/15-xorg.sh
  32. export XORG_PREFIX=/usr/X11R7
  33. export PATH="${PATH}:${XORG_PREFIX}/bin"
  34. export PKG_CONFIG_PATH32="${PKG_CONFIG_PATH32}${PKG_CONFIG_PATH32+:}${XORG_PREFIX}/lib/pkgconfig"
  35. export PKG_CONFIG_PATHN32="${PKG_CONFIG_PATHN32}${PKG_CONFIG_PATHN32+:}${XORG_PREFIX}/lib32/pkgconfig"
  36. export PKG_CONFIG_PATH64="${PKG_CONFIG_PATH64}${PKG_CONFIG_PATH64+:}${XORG_PREFIX}/lib64/pkgconfig"
  37. export ACLOCAL="aclocal -I $XORG_PREFIX/share/aclocal"
  38. # End /etc/profile.d/15-xorg.sh
  39. EOF
  40. # XORG_CONFIG
  41. cat >> /etc/profile.d/15-xorg.sh << "EOF"
  42. # XORG_CONFIG
  43. export XORG_CONFIG32="--prefix=$XORG_PREFIX --sysconfdir=/etc --localstatedir=/var"
  44. export XORG_CONFIGN32="--prefix=$XORG_PREFIX --libdir=$XORG_PREFIX/lib32 --sysconfdir=/etc --localstatedir=/var"
  45. export XORG_CONFIG64="--prefix=$XORG_PREFIX --libdir=$XORG_PREFIX/lib64 --sysconfdir=/etc --localstatedir=/var"
  46. EOF
  47. source /etc/profile
  48. ldconfig
复制代码

  0201-pkg-config
  pkg-config 这个包,前面安过了。如果不想安装一些字符环境下的软件,前面有些软件可以不安装。

  0202-FreeType
  1. # Newer versions of FreeType are incompatible with other packages. Please leave FreeType at 2.1.10 unless you've built a fairly complete system against a newer version without a problem.
  2. [color=red]#手册上推荐使用freetype-2.1.10,因为新的版本和以后要安装的软件是格格不入的。
  3. cd /sources
  4. tar xf /CBLFS/freetype-2.1.10.tar.bz2
  5. cp -a freetype-2.1.10{,-64}
  6. # 32bit
  7. cd freetype-2.1.10
  8. sed -i -r 's:.*(#.*BYTE.*) .*:\1:' include/freetype/config/ftoption.h
  9. #   Configure and compile the package:
  10. CC="gcc ${BUILD32}" ./configure --prefix=/usr &&
  11. make
  12. #   Install the package:
  13. make install &&
  14. mv -v /usr/bin/freetype-config{,-32}
  15. # 64bit
  16. cd ../freetype-2.1.10-64
  17. tar xf /CBLFS/freetype-doc-2.1.10.tar.bz2 --strip-components=2 -C docs
  18. sed -i -r 's:.*(#.*BYTE.*) .*:\1:' include/freetype/config/ftoption.h
  19. #   Configure and compile the package:
  20. CC="gcc ${BUILD64}" ./configure --prefix=/usr --libdir=/usr/lib64 &&
  21. make
  22. #   Install the package:
  23. make install &&
  24. mv -v /usr/bin/freetype-config{,-64} &&
  25. ln -sf multiarch_wrapper /usr/bin/freetype-config &&
  26. install -v -m755 -d /usr/share/doc/freetype-2.1.10 &&
  27. cp -v -R docs/* /usr/share/doc/freetype-2.1.10
  28. cd ..
  29. rm -rf freetype-2.1.10{,-64}
复制代码

  0203-expat
  1. cd /sources
  2. tar xvf /CBLFS/expat-2.0.1.tar.gz
  3. cp -a expat-2.0.1{,-64}
  4. # 32bit
  5. cd expat-2.0.1
  6. #   Configure and compile the package:
  7. CC="gcc ${BUILD32}" ./configure --prefix=/usr &&
  8. make
  9. #   Install the package:
  10. make install
  11. # 64bit
  12. cd ../expat-2.0.1-64
  13. #   Configure and compile the package:
  14. CC="gcc ${BUILD64}" ./configure --prefix=/usr --libdir=/usr/lib64 &&
  15. make
  16. #   Install the package:
  17. make install &&
  18. install -v -m755 -d /usr/share/doc/expat-2.0.1 &&
  19. install -v -m644 doc/*.{html,png,css} /usr/share/doc/expat-2.0.1
  20. cd /sources
  21. rm -rf expat-2.0.1{,-64}
复制代码

  0204-Xcb-proto
  1. # Required
  2. #     * Ensure the proper XORG_CONFIG* variables are set from Xorg7/Intro
  3. cd /sources
  4. tar xvf /CBLFS/xcb-proto-1.0.tar.bz2
  5. cp -a xcb-proto-1.0{,-64}
  6. cd xcb-proto-1.0
  7. # 32Bit
  8. #   Compile the package:
  9. ./configure $XORG_CONFIG32
  10. #   Install the package
  11. make install
  12. # 64bit
  13. cd ../xcb-proto-1.0-64
  14. #   Compile the package:
  15. ./configure $XORG_CONFIG64
  16. #   Install the package
  17. make install
  18. cd /sources
  19. rm -rf xcb-proto-1.0{,-64}
复制代码

  0205-libpthread-stubs
  1. cd /sources
  2. tar xvf /CBLFS/libpthread-stubs-0.1.tar.bz2
  3. cp -a libpthread-stubs-0.1{,-64}
  4. cd libpthread-stubs-0.1
  5. ./configure $XORG_CONFIG32
  6. make install
  7. # 64bit
  8. cd ../libpthread-stubs-0.1-64
  9. ./configure $XORG_CONFIG64
  10. make install
  11. cd /sources
  12. rm -rf libpthread-stubs-0.1{,-64}
复制代码

  0206-LibXML2
  1. cd /sources
  2. tar xvf /CBLFS/libxml2-2.6.29.tar.gz
  3. cp -a libxml2-2.6.29{,-64}
  4. # 32bit
  5. cd libxml2-2.6.29
  6. #   Compile the package:
  7. CC="gcc ${BUILD32}" USE_ARCH=32 ./configure --prefix=/usr &&
  8. make
  9. #   Install the package
  10. make install &&
  11. mv -v /usr/bin/xml2-config{,-32}
  12. # 64bit
  13. cd ../libxml2-2.6.29-64
  14. #   Compile the package:
  15. CC="gcc ${BUILD64}" USE_ARCH=64 ./configure --prefix=/usr \
  16.     --libdir=/usr/lib64 &&
  17. make
  18. #   Install the package
  19. make install &&
  20. mv -v /usr/bin/xml2-config{,-64} &&
  21. ln -sfv multiarch_wrapper /usr/bin/xml2-config
  22. cd /sources
  23. rm -rf libxml2-2.6.29{,-64}
复制代码

  0207-LibXSLT
  1. #Required
  2. #     * LibXML2
  3. cd /sources
  4. tar xvf /CBLFS/libxslt-1.1.21.tar.gz
  5. cp -a libxslt-1.1.21{,-64}
  6. # 32bit
  7. cd libxslt-1.1.21
  8. #   Compile the package:
  9. CC="gcc ${BUILD32}" USE_ARCH=32 ./configure --prefix=/usr &&
  10. make
  11. #   Install the package
  12. make install &&
  13. mv -v /usr/bin/xslt-config{,-32}
  14. # 64bit
  15. cd ../libxslt-1.1.21-64
  16. #   Compile the package:
  17. CC="gcc ${BUILD64}" USE_ARCH=64 ./configure --prefix=/usr \
  18.     --libdir=/usr/lib64 &&
  19. make
  20. #   Install the package
  21. make install &&
  22. mv -v /usr/bin/xslt-config{,-64} &&
  23. ln -sfv multiarch_wrapper /usr/bin/xslt-config
  24. cd /sources
  25. rm -rf libxslt-1.1.21{,-64}
复制代码

  0208-XORG-7.2-Protocol_Headers
  1. # Required : pkg-config
  2. cd /sources/xorg-7.2
  3. wget http://cblfs.cross-lfs.org/images/e/ea/Proto-7.2.wget &&
  4. cd proto &&
  5. wget -B http://xorg.freedesktop.org/releases/X11R7.2/src/proto/ -i ../Proto-7.2.wget
  6. #   Install each protocol:
  7. for i in *.tar.bz2; do
  8.   tar xvf $i;
  9. done
  10. #   Install the protocol headers:
  11. for dir in `find . -maxdepth 1 -mindepth 1 -type d`; do
  12.   cd $dir &&
  13.   PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" ./configure $XORG_CONFIG32 &&
  14.   make install &&
  15.   make clean &&
  16.   PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" ./configure $XORG_CONFIG64 &&
  17.   make install
  18.   cd ..;
  19. done
复制代码

  0209-XORG7.2-Utilities
  1. cd /sources/xorg-7.2
  2. wget http://cblfs.cross-lfs.org/images/d/da/Util-7.2.wget
  3. cd util
  4. wget -B http://xorg.freedesktop.org/releases/X11R7.2/src/util/ -i ../Util-7.2.wget
  5. #   The semi-automated build assumes that you have created the subdirectories discussed in the introduction. After entering the utils directory, unpack the packages:
  6. for i in *.tar.bz2; do
  7. tar xvf $i;
  8. done
  9. #   Make and install xorg-cf-files:
  10. cd xorg-cf-files* &&
  11. sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl &&
  12. CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
  13. ./configure $XORG_CONFIG32 &&
  14. make install &&
  15. make clean &&
  16. sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl &&
  17. CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
  18. ./configure $XORG_CONFIG64 &&
  19. make install &&
  20. cd ..
  21. #   Make and install imake:
  22. cd imake* &&
  23. CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
  24. ./configure $XORG_CONFIG32 --with-script-preproc-cmd="gcc ${BUILD32} -E" &&
  25. make &&
  26. make install &&
  27. mv -v ${XORG_PREFIX}/bin/imake{,-32} &&
  28. mv -v ${XORG_PREFIX}/bin/xmkmf{,-32} &&
  29. mv -v ${XORG_PREFIX}/bin/ccmakedep{,-32} &&
  30. make clean &&
  31. CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
  32. ./configure $XORG_CONFIG64  --with-script-preproc-cmd="gcc ${BUILD64} -E"  &&
  33. make &&
  34. make install &&
  35. mv -v ${XORG_PREFIX}/bin/imake{,-64} &&
  36. mv -v ${XORG_PREFIX}/bin/xmkmf{,-64} &&
  37. mv -v ${XORG_PREFIX}/bin/ccmakedep{,-64} &&
  38. ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/imake &&
  39. ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/xmkmf &&
  40. ln -sfv /usr/bin/multiarch_wrapper ${XORG_PREFIX}/bin/ccmakedep
  41. cd ..
  42. #   Make and install the remaining packages:
  43. for dir in gccmakedep lndir makedepend; do
  44. cd ${dir}* &&
  45. CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
  46. ./configure $XORG_CONFIG32 &&
  47. make &&
  48. make install &&
  49. make clean &&
  50. CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
  51. ./configure $XORG_CONFIG64 &&
  52. make &&
  53. make install &&
  54. cd ..;
  55. done
复制代码

  0210-libXau_form_xorg7.2_lirarie
  1. cd /sources
  2. wget -c http://xorg.freedesktop.org/releases/X11R7.2/src/lib/libXau-X11R7.2-1.0.3.tar.bz2
  3. tar xvf /sources/xorg-7.2/lib/libXau-X11R7.2-1.0.3.tar.bz2
  4. cd libXau-X11R7.2-1.0.3
  5. #   Compile the library.
  6. PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" \
  7. ./configure $XORG_CONFIG32 &&
  8. make
  9. #   Install the library.
  10. make install
  11. make distclean
  12. PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" \
  13. ./configure $XORG_CONFIG64 &&
  14. make &&
  15. make install
  16. cd /sources
  17. rm -rf libXau-X11R7.2-1.0.3
复制代码

  0211-libxcb
  1. # Required
  2. #     * xcb-proto
  3. #     * libpthread-stubs
  4. #     * LibXSLT
  5. #     * libXau from Xorg7/Libraries
  6. cd /sources
  7. tar xvf /CBLFS/libxcb-1.0.tar.bz2
  8. cp -a libxcb-1.0{,-64}
  9. # 32bit
  10. cd libxcb-1.0
  11. #   Compile the package:
  12. CC="gcc ${BUILD32}" PKG_CONFIG_PATH=${PKG_CONFIG_PATH32} \
  13. ./configure $XORG_CONFIG32 &&
  14. make
  15. #   Install the package
  16. make install
  17. cd ../libxcb-1.0-64
  18. #  64Bit
  19. #   Compile the package:
  20. CC="gcc ${BUILD64}" PKG_CONFIG_PATH=${PKG_CONFIG_PATH64} \
  21. ./configure $XORG_CONFIG64 &&
  22. make
  23. #   Install the package
  24. make install
  25. cd /sources
  26. rm -rf libxcb-1.0{,-64}
复制代码

  0212-Gperf
  1. cd /CBLFS/
  2. wget -c ftp://ftp.gnu.org/pub/gnu/gperf/gperf-3.0.3.tar.gz
  3. cd /sources
  4. tar xvf /CBLFS/gperf-3.0.3.tar.gz
  5. cp -a gperf-3.0.3{,-64}
  6. # 32bit
  7. cd gperf-3.0.3
  8. #   Compile the package:
  9. CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" \
  10. ./configure --prefix=/usr &&
  11. make
  12. #   Install the package
  13. make install
  14. mv -v /usr/bin/gperf{,-32}
  15. # 64bit
  16. cd ../gperf-3.0.3-64
  17. #   Compile the package:
  18. CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" \
  19. ./configure --prefix=/usr &&
  20. make
  21. #   Install the package
  22. make install
  23. cd /sources
  24. rm -rf gperf-3.0.3{,-64}
复制代码

  0213-xcb-utils
  1. # Required
  2. #     * libxcb
  3. #     * Gperf
  4. cd /sources
  5. tar xvf /CBLFS/xcb-util-0.2.tar.bz2
  6. cp -a xcb-util-0.2{,-64}
  7. # 32bit
  8. cd xcb-util-0.2
  9. #   Compile the package:
  10. CC="gcc ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
  11. ./configure $XORG_CONFIG32 &&
  12. make
  13. #   Install the package
  14. make install
  15. # 64bit
  16. cd ../xcb-util-0.2-64
  17. #   Compile the package:
  18. CC="gcc ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
  19. ./configure $XORG_CONFIG64 &&
  20. make
  21. #   Install the package
  22. make install
  23. cd /sources
  24. rm -rf xcb-util-0.2{,-64}
复制代码

  0214-fontconfig
  1. # Required
  2. #     * FreeType
  3. #     * expat
  4. cd /sources
  5. tar xvf /CBLFS/fontconfig-2.4.2.tar.gz
  6. cp -a fontconfig-2.4.2{,-64}
  7. # 32bit
  8. cd fontconfig-2.4.2
  9. #   Compile the package:
  10. USE_ARCH=32 CC="gcc ${BUILD32}" ./configure --prefix=/usr \
  11.     --sysconfdir=/etc --localstatedir=/var --disable-docs --without-add-fonts \
  12.     --with-docdir=/usr/share/doc/fontconfig-2.4.2 &&
  13. make
  14. #   Install the package
  15. make install
  16. cd ../fontconfig-2.4.2-64
  17. #64Bit
  18. #   Compile the package:
  19. USE_ARCH=64 CC="gcc ${BUILD64}" ./configure --prefix=/usr \
  20.     --sysconfdir=/etc --localstatedir=/var --disable-docs --without-add-fonts \
  21.     --with-docdir=/usr/share/doc/fontconfig-2.4.2 \
  22.     --libdir=/usr/lib64 &&
  23. make
  24. #   Install the package
  25. make install &&
  26. install -v -m644 doc/*.3 /usr/share/man/man3 &&
  27. install -v -m644 doc/*.5 /usr/share/man/man5 &&
  28. install -v -m755 -d /usr/share/doc/fontconfig-2.4.2/fontconfig-devel &&
  29. install -v -m644 doc/*.{html,pdf,txt} /usr/share/doc/fontconfig-2.4.2 &&
  30. install -v -m644 doc/fontconfig-devel/* /usr/share/doc/fontconfig-2.4.2/fontconfig-devel
  31. cd /sources
  32. rm -rf fontconfig-2.4.2{,-64}
复制代码

  0215-libpng
  1. cd /sources
  2. tar xvf /CBLFS/libpng-1.2.18.tar.bz2
  3. cp -a libpng-1.2.18{,-64}
  4. # 32bit
  5. cd libpng-1.2.18
  6. #   Compile the package:
  7. CC="gcc ${BUILD32}" ./configure --prefix=/usr &&
  8. make
  9. #   Install the package
  10. make install &&
  11. mv -v /usr/bin/libpng12-config{,-32} &&
  12. ln -sfv libpng12-config-32 /usr/bin/libpng-config-32
  13. # 64bit
  14. cd ../libpng-1.2.18-64
  15. #   Compile the package:
  16. CC="gcc ${BUILD64}" ./configure --prefix=/usr --libdir=/usr/lib64 &&
  17. make
  18. #   Install the package
  19. make install &&
  20. mv -v /usr/bin/libpng12-config{,-64} &&
  21. ln -sfv libpng12-config-64 /usr/bin/libpng-config-64 &&
  22. ln -sfv multiarch_wrapper /usr/bin/libpng-config &&
  23. ln -sfv multiarch_wrapper /usr/bin/libpng12-config &&
  24. install -v -m755 -d /usr/share/doc/libpng-1.2.18 &&
  25. install -v -m644 README libpng-1.2.18.txt /usr/share/doc/libpng-1.2.18
  26. cd /sources
  27. rm -rf libpng-1.2.18{,-64}
复制代码

受字数限制,分两次。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-9-13 19:30:40 | 显示全部楼层

xorg-7.2安装过程 (续)

  0216-XORG-7.2-Libraries

  1. # Required
  2. #        * FreeType
  3. #        * FontConfig
  4. # Recommended Optional
  5. #        * XCB

  6. cd /sources/xorg-7.2
  7. #get http://cblfs.cross-lfs.org/images/5/5f/Lib-7.2.wget &&
  8. cd lib &&
  9. wget -B http://xorg.freedesktop.org/releases/X11R7.2/src/lib/ -i ../Lib-7.2.wget

  10. #   After entering the lib subdirectory and downloading the tarballs, unpack the packages:
  11. for i in *.tar.bz2; do
  12.   tar xjvf $i;
  13. done

  14. #   Build and install each library:
  15. for dir in `sed "s/.tar.bz2//g" ../Lib-7.2.wget`; do
  16.    cd ${dir} &&
  17.    PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" \
  18.   ./configure $XORG_CONFIG32 &&
  19.   make &&
  20.   make install &&
  21.   make distclean &&
  22.   PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" \
  23.   ./configure $XORG_CONFIG64 &&
  24.   make &&
  25.   make install &&
  26.   cd ..;
  27. done

复制代码


  0217-Xorg-7.2-libdrm

  1. #http://dri.freedesktop.org/libdrm/libdrm-2.3.0.tar.bz2
  2. cd /sources
  3. tar xvf /CBLFS/libdrm-2.3.0.tar.bz2
  4. cd libdrm-2.3.0
  5. # 32Bit
  6. #   Compile the package:
  7. CC="gcc ${BUILD32}" ./configure $XORG_CONFIG32 &&
  8. make
  9. #   Install the package:
  10. make install
  11. cd /sources
  12. rm -rf libdrm-2.3.0

  13. cd /sources
  14. tar xvf /CBLFS/libdrm-2.3.0.tar.bz2
  15. cd libdrm-2.3.0
  16. # 64Bit
  17. #   Compile the package:
  18. CC="gcc ${BUILD64}" ./configure $XORG_CONFIG64 &&
  19. make
  20. #   Install the package:
  21. make install
  22. cd /sources
  23. rm -rf libdrm-2.3.0
复制代码


  0218-MesaLib

  1. # Required
  2. #     * Xorg Protocol Headers glproto >=1.4.5
  3. #     * Xorg Libraries
  4. #     * Xorg Utilities
  5. #     * libdrm
  6. # Optional
  7. #     * XCB

  8. #http://downloads.sourceforge.net/mesa3d/MesaLib-6.5.2.tar.bz2
  9. #http://downloads.sourceforge.net/mesa3d/MesaDemos-6.5.2.tar.bz2
  10. #http://downloads.sourceforge.net/mesa3d/MesaGLUT-6.5.2.tar.bz2
  11. #http://svn.cross-lfs.org/svn/repos/patches/Mesa/mesa-6.5.2-drop_static_inline.patch

  12. cd /sources
  13. tar xvf /CBLFS/MesaLib-6.5.2.tar.bz2
  14. tar xvf /CBLFS/MesaDemos-6.5.2.tar.bz2
  15. tar xvf /CBLFS/MesaGLUT-6.5.2.tar.bz2
  16. # 32Bit
  17. #   The Mesa source is needed to build Xorg7/Xserver, save the Mesa source tree for use with the build.
  18. cp -a Mesa-6.5.2{,-32} &&
  19. cd Mesa-6.5.2-32
  20. #   Apply a patch that solves some linker errors with the savage dri driver.
  21. patch -Np1 -i /CBLFS/mesa-6.5.2-drop_static_inline.patch
  22. #   Create a config:
  23. ln -sf linux-dri configs/current &&
  24. echo 'X11_INCLUDES = $(shell pkg-config --cflags-only-I x11)' >> configs/current &&
  25. echo 'CFLAGS += $(X11_INCLUDES)' >> configs/current &&
  26. echo 'EXTRA_LIB_PATH = $(shell pkg-config --libs-only-L x11)' >> configs/current &&
  27. echo "DRI_DRIVER_INSTALL_DIR = ${XORG_PREFIX}/lib/xorg/modules/dri" >> configs/current &&
  28. echo "INSTALL_DIR = /usr" >> configs/current &&
  29. echo "LIB_DIR = lib" >> configs/current
  30. # If you have XCB installed you also need to add the following to the config:
  31. echo 'DEFINES += -DUSE_XCB' >> configs/current &&
  32. echo 'X11_INCLUDES += $(shell pkg-config --cflags-only-I xcb x11-xcb xcb-glx)' >> configs/current &&
  33. echo 'GL_LIB_DEPS += $(shell pkg-config --libs xcb x11-xcb xcb-glx)' >> configs/current
  34. #   Compile the package:
  35. PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
  36. make CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" default
  37. #   Install the package:
  38. make install
  39. cd /sources
  40. # The Mesa source is needed to build Xorg7/Xserver, save the Mesa source tree for use with the build.
  41. #rm -rf Mesa-6.5.2-32

  42. # 64Bit
  43. #   The Mesa source is needed to build Xorg7/Xserver, save the Mesa source tree for use with the build.
  44. mv Mesa-6.5.2{,-64} &&
  45. cd Mesa-6.5.2-64
  46. #   Apply a patch that solves some linker errors with the savage dri driver.
  47. patch -Np1 -i /CBLFS/mesa-6.5.2-drop_static_inline.patch
  48. #   Create a config:
  49. ln -sf linux-dri configs/current &&
  50. echo 'X11_INCLUDES = $(shell pkg-config --cflags-only-I x11)' >> configs/current &&
  51. echo 'CFLAGS += $(X11_INCLUDES)' >> configs/current &&
  52. echo 'EXTRA_LIB_PATH = $(shell pkg-config --libs-only-L x11)' >> configs/current &&
  53. echo "DRI_DRIVER_INSTALL_DIR = ${XORG_PREFIX}/lib64/xorg/modules/dri" >> configs/current &&
  54. echo "INSTALL_DIR = /usr" >> configs/current &&
  55. echo "LIB_DIR = lib64" >> configs/current
  56. #   If you have XCB installed you also need to add the following to the config:
  57. echo 'DEFINES += -DUSE_XCB' >> configs/current &&
  58. echo 'X11_INCLUDES += $(shell pkg-config --cflags-only-I xcb x11-xcb xcb-glx)' >> configs/current &&
  59. echo 'GL_LIB_DEPS += $(shell pkg-config --libs xcb x11-xcb xcb-glx)' >> configs/current
  60. #   Compile the package:
  61. PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
  62. make CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" default
  63. #   Install the package:
  64. make install
  65. #   If you would like to build and install glxinfo and glxgears execute the following command:
  66. PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
  67.     make CC="gcc ${BUILD64}" -C progs/xdemos glxinfo glxgears &&
  68. install -m755 -v progs/xdemos/{glxinfo,glxgears} /usr/bin
  69. cd /sources
  70. #The Mesa source is needed to build Xorg7/Xserver, save the Mesa source tree for use with the build.
  71. #rm -rf Mesa-6.5.2-64
复制代码


  0219-xbitmaps

  1. # Required
  2. #     * Xorg Utilities
  3. cd /sources
  4. tar xvf /CBLFS/xbitmaps-X11R7.0-1.0.1.tar.bz2
  5. cp -a xbitmaps-X11R7.0-1.0.1{,-64}
  6. # 32Bit
  7. cd xbitmaps-X11R7.0-1.0.1
  8. #   Configure the package:
  9. CC="gcc ${BUILD32}" ./configure $XORG_CONFIG32
  10. #   Install the package:
  11. make install

  12. # 64bit
  13. cd ../xbitmaps-X11R7.0-1.0.1-64
  14. #   Configure the package:
  15. CC="gcc ${BUILD64}" ./configure $XORG_CONFIG64
  16. #   Install the package:
  17. make install
  18. cd /sources
  19. rm -rf xbitmaps-X11R7.0-1.0.1
复制代码


  0220-Apps

  1. # Required
  2. #         * xbitmaps
  3. #         * libpng
  4. #         * MesaLib
  5. #         * FreeType
  6. #         * libXfont  --> Xorg-7.2 / Lib

  7. cd /sources/xorg-7.2
  8. wget http://cblfs.cross-lfs.org/images/c/cd/App-7.2.wget &&
  9. cd app &&
  10. wget -B http://xorg.freedesktop.org/releases/X11R7.2/src/app/ -i ../App-7.2.wget

  11. for i in *.tar.bz2; do
  12.   tar xvf $i;
  13. done

  14. #   Build and install the applications in the App-7.2.wget file:
  15. for dir in `sed "s/.tar.bz2//g" ../App-7.2.wget`; do
  16. cd ${dir} &&
  17. PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" CC="gcc ${BUILD32}" CXX="g++  ${BUILD32}" \
  18. ./configure $XORG_CONFIG32 &&
  19. make &&
  20. make install &&
  21. make distclean &&
  22. PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" CC="gcc ${BUILD64}" CXX="g++  ${BUILD64}" \
  23. ./configure $XORG_CONFIG64 &&
  24. make &&
  25. make install &&
  26. cd ..;
  27. done
复制代码


  0221-XML-Parser

  1. cd /sources
  2. tar xf /CBLFS/XML-Parser-2.34.tar.gz
  3. cp -a XML-Parser-2.34{,-64}
  4. # 32 bit
  5. cd XML-Parser-2.34
  6. USE_ARCH=32 perl Makefile.PL
  7. make
  8. make test
  9. make install

  10. # 64bit
  11. cd ../XML-Parser-2.34-64
  12. USE_ARCH=64 perl Makefile.PL &&
  13. make &&
  14. make test
  15. make install
  16. cd ..
  17. rm -rf XML-Parser-2.34{,-64}
复制代码


  0222-Data

  1. #http://xorg.freedesktop.org/releases/X11R7.2/src/data/xcursor-themes-X11R7.0-1.0.1.tar.bz2
  2. #http://xorg.freedesktop.org/releases/X11R7.2/src/extras/xkeyboard-config-0.9.tar.bz2
  3. #http://svn.cross-lfs.org/svn/repos/patches/xkeyboard-config/xkeyboard-config-0.9-use_relative_path-1.patch
  4. #Required
  5. #     * Xorg Apps
  6. #     * XML::Parser
  7. cd /sources
  8. # 32bit
  9. tar xvf /CBLFS/xcursor-themes-X11R7.0-1.0.1.tar.bz2
  10. cd xcursor-themes-X11R7.0-1.0.1
  11. #   Install xcursor-themes with the following command:
  12. PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" CC="gcc ${BUILD32}" CXX="g++  ${BUILD32}" \
  13. ./configure $XORG_CONFIG32 &&
  14. make &&
  15. make install
  16. #   Install xkeyboard-config with the following command:
  17. tar xvf /CBLFS/xkeyboard-config-0.9.tar.bz2
  18. cd xkeyboard-config-0.9
  19. patch -Np1 -i /CBLFS/xkeyboard-config-0.9-use_relative_path-1.patch
  20. ./configure $XORG_CONFIG32 \
  21.     --with-xkb-base=${XORG_PREFIX}/share/X11/xkb \
  22.     --with-xkb-rules-symlink=xorg --enable-compat-rules &&
  23. make &&
  24. make install
  25. cd /sources
  26. rm -rf xcursor-themes-X11R7.0-1.0.1

  27. # 64bit
  28. cd /sources
  29. tar xvf /CBLFS/xcursor-themes-X11R7.0-1.0.1.tar.bz2
  30. cd xcursor-themes-X11R7.0-1.0.1
  31. # 64Bit
  32. #   Install xcursor-themes with the following command:
  33. PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" CC="gcc ${BUILD64}" CXX="g++  ${BUILD64}" \
  34. ./configure $XORG_CONFIG64 &&
  35. make &&
  36. make install
  37. #   Install xkeyboard-config with the following command:
  38. tar xvf /CBLFS/xkeyboard-config-0.9.tar.bz2
  39. cd xkeyboard-config-0.9
  40. patch -Np1 -i /CBLFS/xkeyboard-config-0.9-use_relative_path-1.patch
  41. ./configure $XORG_CONFIG64 \
  42.     --with-xkb-base=${XORG_PREFIX}/share/X11/xkb \
  43.     --with-xkb-rules-symlink=xorg --enable-compat-rules &&
  44. make &&
  45. make install
  46. cd /sources
  47. rm -rf xcursor-themes-X11R7.0-1.0.1
复制代码


  0223-Fonts

  1. ldconfig
  2. cd /sources/xorg-7.2
  3. wget http://cblfs.cross-lfs.org/images/1/17/Font-7.2.wget &&
  4. cd font &&
  5. wget -B http://xorg.freedesktop.org/releases/X11R7.2/src/font/ -i ../Font-7.2.wget

  6. for i in *.tar.bz2; do
  7.   tar xvf $i;
  8. done

  9. for dir in `sed "s/.tar.bz2//g" ../Font-7.2.wget`; do
  10.   cd ${dir} &&
  11.   sed -i 's:${libdir}/X11/fonts:/usr/share/fonts:g' configure &&
  12.   PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" CC="gcc ${BUILD32}" \
  13.   ./configure $XORG_CONFIG32 &&
  14.   make &&
  15.   make install &&
  16.   make distclean &&
  17.   PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" CC="gcc ${BUILD64}" \
  18.   ./configure $XORG_CONFIG64 &&
  19.   make &&
  20.   make install &&
  21.   cd ..;
  22. done

复制代码


  0224-Xserver

  1. #http://xorg.freedesktop.org/releases/X11R7.2/src/xserver/xorg-server-X11R7.2-1.2.0.tar.bz2
  2. ldconfig
  3. cd /sources
  4. tar xf /CBLFS/xorg-server-X11R7.2-1.2.0.tar.bz2
  5. cp -a xorg-server-X11R7.2-1.2.0{,-64}
  6. # 32bit
  7. cd xorg-server-X11R7.2-1.2.0
  8. sed -i 's@-I$(top_builddir)/include@-I$(top_builddir)/GL/mesa/main@8' GL/glx/Makefile.in
  9. sed -i 's@-I$(top_builddir)/include@-I$(top_builddir)/GL/mesa/glapi@7' GL/glx/Makefile.in

  10. sed -i '/xpconfigdir=/s@=.*@=$datadir/X11/xserver@' configure
  11. sed -i '/-DXPRINTDIR/s/libdir/datadir/' hw/xprint/Makefile.in
  12. PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" USE_ARCH=32 CC="gcc ${BUILD32}" \
  13. ./configure $XORG_CONFIG32 --enable-install-setuid \
  14.     --with-dri-driver-path="${XORG_PREFIX}/lib/xorg/modules/dri" \
  15.     --with-fontdir="/usr/share/fonts" \
  16.     --with-mesa-source="${PWD}/../Mesa-6.5.2-32"
  17. make
  18. make install


  19. # 64bit
  20. cd ../xorg-server-X11R7.2-1.2.0-64
  21. sed -i 's@-I$(top_builddir)/include@-I$(top_builddir)/GL/mesa/main@8' GL/glx/Makefile.in
  22. sed -i 's@-I$(top_builddir)/include@-I$(top_builddir)/GL/mesa/glapi@7' GL/glx/Makefile.in

  23. sed -i '/xpconfigdir=/s@=.*@=$datadir/X11/xserver@' configure
  24. sed -i '/-DXPRINTDIR/s/libdir/datadir/' hw/xprint/Makefile.in
  25. PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" USE_ARCH=64 CC="gcc ${BUILD64}" \
  26. ./configure $XORG_CONFIG64 --enable-install-setuid \
  27.     --with-dri-driver-path="${XORG_PREFIX}/lib64/xorg/modules/dri" \
  28.     --with-fontdir="/usr/share/fonts" \
  29.     --with-mesa-source="${PWD}/../Mesa-6.5.2-64"
  30. make
  31. make install
  32. cd ..
复制代码


  0225-Xorg-Drivers

  1. # Required : Xserver
  2. cd /sources/xorg-7.2
  3. wget http://cblfs.cross-lfs.org/index.php/Special:Filepath/Driver-7.3.wget
  4. cd driver &&
  5. wget -B http://xorg.freedesktop.org/releases/X11R7.3/src/driver/ -i ../Driver-7.3.wget
  6. cd /sources
  7. mkdir -pv driver
  8. cd driver
  9. # driver.list
  10. cat > driver.list << "EOF"
  11. xf86-input-void-X11R7.1-1.1.0
  12. xf86-input-keyboard-X11R7.2-1.1.1
  13. xf86-input-mouse-X11R7.2-1.1.2
  14. xf86-video-vesa-X11R7.2-1.3.0
  15. xf86-video-vga-X11R7.1-4.1.0
  16. xf86-video-chips-X11R7.1-1.1.1
  17. EOF
  18. # 仅安装上面的这几个驱动就已经足够启动图形了,但最好还是将适合自己显卡的驱动装上。
  19. # ati显卡的将 ati 的加到上面,nvidia的将nv的加到上面。详情看 CBLFS 手册。
  20. for x in `cat driver.list` ;do
  21.   tar xf /sources/xorg-7.2/driver/$x.tar.bz2
  22. done &&
  23. #
  24. for dir in `cat driver.list`; do
  25.    cd ${dir} &&
  26. PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" \
  27. ./configure ${XORG_CONFIG32} &&
  28. make &&
  29. make install &&
  30. make distclean &&
  31. PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" \
  32. ./configure ${XORG_CONFIG64} &&
  33. make &&
  34. make install &&
  35. cd .. ;
  36. done
复制代码


  0226-Xorg-xterm

  1. cd /sources
  2. tar xf /CBLFS/xterm-227.tgz
  3. cp -a xterm-227{,-64}
  4. cd xterm-227
  5. #32bit
  6. USE_ARCH=32 CC="gcc ${BUILD32}" \
  7. PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
  8. ./configure ${XORG_CONFIG32} --with-wide-chars \
  9.     --with-app-defaults=${XORG_PREFIX}/share/X11/app-defaults &&
  10. make
  11. make install &&
  12. make install-ti

  13. # 64bit
  14. cd ../xterm-227-64
  15. USE_ARCH=64 CC="gcc ${BUILD64}" \
  16. PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
  17. ./configure ${XORG_CONFIG64} --with-wide-chars \
  18.     --with-app-defaults=${XORG_PREFIX}/share/X11/app-defaults &&
  19. make
  20. make install &&
  21. make install-ti

  22. # Configuring
  23. cat >> $XORG_PREFIX/share/X11/app-defaults/XTerm << "EOF"
  24. *VT100*locale: true
  25. *VT100*faceName: Monospace
  26. *VT100*faceSize: 10
  27. EOF

  28. cd ..
  29. rm -rf xterm-227{,-64}
复制代码


  0227-Xorg-rman

  1. cd /sources
  2. tar xf /CBLFS/rman-3.2.tar.gz
  3. cd rman-3.2
  4. #  Non-Multilib or Multilib
  5. # 这里,Non-Multilib和Multilib都用这种方法安装
  6. sed -i -e "s@/opt/local@$XORG_PREFIX@" \
  7.     -e "s@/usr/local@$XORG_PREFIX/share@" \
  8.     -e "s@share/man@man@" Makefile
  9. make
  10. make install
  11. cd ..
  12. rm -rf /sources/rman-3.2
复制代码


  0228-Config

  1. # #  FHS Symlinks # #
  2. # If you installed an X Window System into a prefix other then /usr and you wish to be FHS compliant, it is necessary to create some symbolic links.
  3. # 如果 Xorg 不是安装在 /usr 目录,而是 /usr/X11R7 或者其它目录,这里需要建链接如下:
  4. ln -sv ${XORG_PREFIX}/bin /usr/bin/X11
  5. ln -sv ${XORG_PREFIX}/include/X11 /usr/include/X11
  6. # Non-Multilib
  7. #  ln -sv ${XORG_PREFIX}/lib/X11 /usr/lib/X11

  8. # Multilib
  9. # 因为是 x86_64-Multilib , 所以 N32 的就不需要做链接了。
  10. ln -sv ${XORG_PREFIX}/lib/X11 /usr/lib/X11
  11. # ln -sv ${XORG_PREFIX}/lib32/X11 /usr/lib32/X11
  12. ln -sv ${XORG_PREFIX}/lib64/X11 /usr/lib64/X11
  13. # Creating /etc/X11/xorg.conf
  14. cd ~ &&
  15. Xorg -configure
  16. #This will create a configuration file in root's home directory called xorg.conf.new. You may edit this file to provide specific settings for your system. Some things that are commonly edited.
  17. #In Section "Files". Change the order of the font paths searched or remove some font directories completely (of course why did you install them if you weren't going to use them?).
  18. #In Section "Module". If you are going to install nVidia drivers, remove the "Load dri" line.
  19. #In Section "Device". You may want to set some of the options available for your selected video driver. If you have an nVidia chip, whether using the "nv" or the "nvidia" driver, you may need to edit this section to resolve Xorg bug 3009 involving a missing mouse pointer. Add this line to Section "Device".
  20. ###### NV
  21. # 如果是 nvidia 的显卡,需要在 生成的 xorg 配置文件中加这么一句:
  22. # Option      "HWCursor" "off"
  23. #运行 X -config ~/xorg.conf.new 生成 xorg 配置文件,这里会看到屏幕上出现 X 形状的鼠标指针。可以按 Ctrl Shift 和 Backspace 键退出。运行这条命令偶尔会看到屏幕上出现开机时BIOS的启动画面,四月中旬我的台式机见过一次,前几日我的笔记本见到一次。出现这种现在本机键盘会暂时失灵。这时,可以从另一台机器 ssh 登录,然后 重启机器,否则只好按 reset 或 power 键了。
  24. X -config ~/xorg.conf.new
  25. install -v -m755 -D ~/xorg.conf.new /etc/X11/xorg.conf
复制代码



  上面这些做完之后,运行 startx 稍等待就可以看到屏幕中出现 三个终端。

  也可以这样测试xorg是否安装好了,这里用 BLFS 手册的方法:

  0229-Xorg-test

  1. cat > ~/.xinitrc << "EOF" &&
  2. # Begin .xinitrc file
  3. xterm -g 80x40+0+0 &
  4. xclock -g 100x100-0+0 &
  5. twm
  6. EOF
  7. cat >> /etc/sysconfig/createfiles << "EOF"
  8. /tmp/.ICE-unix dir 1777 root root
  9. EOF
复制代码


  1. cat > 0230-test-test << "EOF"
  2. startx
  3. xcalc &
  4. EOF
  5. bash 30-test-test
复制代码
回复 支持 反对

使用道具 举报

发表于 2007-9-13 19:32:41 | 显示全部楼层
Post by tfkdmwmqtr
今天准备写到凌晨两点。


好,辛苦了,我等。。。!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-9-13 19:43:32 | 显示全部楼层

X Libraries

X Libraries

  本文选择安装一个简单的KDE桌面环境。

  这里,只选择安装很少的软件包,适当选择几个较有用的包装上。由于本文选择的软件都很新,一定会有很多软件装不上,很多软件都可能会编译出错。
  现在先安装一些 KDE 桌面环境必須的和可选的软件包。CBLFS手册中把它们归纳为  X Libraries ,也就是 Xwindow 库。

QT3安装过程:

  0301-giflib
  giflib不是必須的,KDE也不依赖它,手册中也没有推荐安装它。可以选择不编译这个软件。
  1. cd /sources
  2. tar xf /CBLFS/giflib-4.1.4.tar.bz2
  3. cp -a giflib-4.1.4{,-64}
  4. # 32bit
  5. cd giflib-4.1.4
  6. CC="gcc ${BUILD32}" LDFLAGS="-L/usr/lib" ./configure --prefix=/usr &&
  7. make
  8. make install
  9. # 64bit
  10. cd ../giflib-4.1.4-64
  11. CC="gcc ${BUILD64}" ./configure --prefix=/usr --libdir=/usr/lib64 &&
  12. make
  13. make install &&
  14. install -v -m755 -d /usr/share/doc/giflib-4.1.4/html &&
  15. install -v -m644 doc/*.{png,html} \
  16.     /usr/share/doc/giflib-4.1.4/html &&
  17. install -v -m644 doc/*.txt \
  18.     /usr/share/doc/giflib-4.1.4
  19. cd ..
  20. rm -rf giflib-4.1.4{,-64}
复制代码

  0302-libjpeg
  1. cd /sources
  2. tar xvf /CBLFS/jpegsrc.v6b.tar.gz
  3. cp -a jpeg-6b{,-64}
  4. # 32bit
  5. cd jpeg-6b
  6. patch -Np1 -i /CBLFS/jpeg-6b-config_update-1.patch &&
  7. CC="gcc ${BUILD32}" ./configure --prefix=/usr --enable-static --enable-shared &&
  8. make
  9. make install
  10. # 64bit
  11. cd ../jpeg-6b-64
  12. patch -Np1 -i /CBLFS/jpeg-6b-config_update-1.patch &&
  13. CC="gcc ${BUILD64}" ./configure --prefix=/usr --libdir=/usr/lib64 \
  14.     --enable-static --enable-shared &&
  15. make libdir=/usr/lib64
  16. make libdir=/usr/lib64 install
  17. cd ..
  18. rm -rf jpeg-6b{,-64}
复制代码

  0303-little_cms
  libmng 会依赖这个包,而编译qt3必須先安装有libmng 。
  1. cd /sources
  2. tar xvf /CBLFS/lcms-1.16.tar.gz
  3. cp -a lcms-1.16{,-64}
  4. # 32bit
  5. cd lcms-1.16
  6. CC="gcc ${BUILD32}" ./configure --prefix=/usr &&
  7. make
  8. make install
  9. # 64bit
  10. cd ../lcms-1.16-64
  11. CC="gcc ${BUILD64}" ./configure --prefix=/usr --libdir=/usr/lib64 &&
  12. make
  13. make install &&
  14. install -v -m755 -d /usr/share/doc/lcms-1.16 &&
  15. install -v -m644 README.1ST doc/* /usr/share/doc/lcms-1.16
  16. cd ..
  17. rm -rf lcms-1.16{,-64}
复制代码

  0304-libmng
  1. cd /sources
  2. tar xvf /CBLFS/libmng-1.0.10.tar.gz
  3. cp -a libmng-1.0.10{,-64}
  4. # 32bit
  5. cd libmng-1.0.10
  6. cp makefiles/makefile.linux Makefile
  7. patch -Np1 -i /CBLFS/libmng-1.0.10-libdir-1.patch
  8. make CC="gcc ${BUILD32}"
  9. make install
  10. # 64bit
  11. cd ../libmng-1.0.10-64
  12. cp makefiles/makefile.linux Makefile
  13. patch -Np1 -i /CBLFS/libmng-1.0.10-libdir-1.patch
  14. make CC="gcc ${BUILD64}" libdir=/usr/lib64
  15. make libdir=/usr/lib64 install
  16. install -v -m644 doc/man/*.3 /usr/share/man/man3 &&
  17. install -v -m644 doc/man/*.5 /usr/share/man/man5 &&
  18. install -dv -m755 /usr/share/doc/libmng-1.0.10 &&
  19. install -v -m644 doc/*.{png,txt} /usr/share/doc/libmng-1.0.10
  20. cd ..
  21. rm -rf libmng-1.0.10{,-64}
复制代码

  0305-nas
  NAS 就是 Network Audio System , 网络音频系统。详见的手册有说明。
  1. cd /sources
  2. tar xvf /CBLFS/nas-1.9.src.tar.gz
  3. cp -a nas-1.9{,-64}
  4. # 32bit
  5. cd nas-1.9
  6. USE_ARCH=32 xmkmf &&
  7. USE_ARCH=32 make World
  8. #   Install the package
  9. USE_ARCH=32 make install
  10. # 64bit
  11. cd ../nas-1.9-64
  12. #   Compile the package:
  13. USE_ARCH=64 xmkmf &&
  14. USE_ARCH=64 make World
  15. #   Install the package
  16. USE_ARCH=64 make install install.man &&
  17. install -v -m755 -d /usr/share/doc/nas-1.9/pdf &&
  18. install -v -m644 doc/pdf/* /usr/share/doc/nas-1.9/pdf &&
  19. install -v -m644 doc/{README,actions,*.{ps,txt}} \
  20.     /usr/share/doc/nas-1.9
  21. cd ..
  22. rm -rf nas-1.9{,-64}
  23. #  Configuration
  24. #   Create the NAS configuration file using the following command:
  25. install -v -m644 /etc/nas/nasd.conf.eg /etc/nas/nasd.conf
  26. # BootScript
  27. #   Install the /etc/rc.d/init.d/gpm init script included in the blfs-bootscripts package.
  28. cd ../blfs-bootscripts-20060910
  29. make install-nas
  30. # The init script uses a default prefix of /usr/X11R6. If you've installed the X Window System into any other prefix, execute the following command, replacing <PREFIX> with the installation prefix of the X Window System.
  31. sed -i "s@/usr/X11R6@${XORG_PREFIX}@g" /etc/rc.d/init.d/nas
  32. /etc/rc.d/init.d/nas start
复制代码

  0306-qt3
  1. ldconfig
  2. # If you would like to compile with MySQL support add the following to the configure command:
  3. # -qt-sql-mysql
  4. # And run this sed before compiling:
  5. # sed -i "s@mysql.h@mysql/mysql.h@g" src/sql/drivers/mysql/qsql_mysql.h
  6. # If you would like to compile with NAS support add the following to the configure command:
  7. # 如果想编译加入 NAS 支持可以加入以下 configure 命令。(文中已加入支持)
  8. # -system-nas-sound
  9. cd /sources
  10. tar xvf /CBLFS/qt-x11-free-3.3.8.tar.bz2
  11. cp -a qt-x11-free-3.3.8{,-64}
  12. # 32bit
  13. cd qt-x11-free-3.3.8
  14. #   If you're X Window System prefix is something other then /usr/X11R6 then run the following command to change the hard
  15. #   coded paths in the sources:
  16. #  如果你的Xorg不是安装在 /usr/X11R6(本文安装在/usr/X11R7目录),需要运行以下命令改变 path :
  17. ####################################################################
  18. for file in $(grep -lr "X11R6" *)
  19. do
  20.     sed -i "s@/usr/X11R6@${XORG_PREFIX}@g" $file
  21. done
  22. #####################################################################
  23. #    Compile the package
  24. export QTDIR=$PWD &&
  25. export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &&
  26. export PATH=$PWD/bin:$PATH &&
  27. export QMAKESPEC=linux-g++-32 &&
  28. patch -Np1 -i /CBLFS/qt-3.3.8-utf8-1.patch
  29. ./configure -prefix /opt/qt-3.3.8 \
  30. -plugindir /opt/qt-3.3.8/lib/plugin \
  31. -sysconfdir /etc/qt \
  32. -qt-gif \
  33. -system-zlib \
  34. -system-libpng \
  35. -system-libjpeg \
  36. -system-libmng \
  37. -plugin-imgfmt-png \
  38. -plugin-imgfmt-jpeg \
  39. -plugin-imgfmt-mng \
  40. -no-exceptions \
  41. -thread \
  42. -system-nas-sound \
  43. -tablet &&
  44. make &&
  45. #   Install the package
  46. make install &&
  47. mv -v /opt/qt-3.3.8/bin/qmake{,-32} &&
  48. mv -v /opt/qt-3.3.8/bin/uic{,-32} &&
  49. mv -v /opt/qt-3.3.8/bin/moc{,-32} &&
  50. mv -v /opt/qt-3.3.8/bin/qtconfig{,-32} &&
  51. ln -sv libqt-mt.so /opt/qt-3.3.8/lib/libqt.so &&
  52. install -dv -m755 /usr/share/qt
  53. #ln -v -snf ../../bin /usr/share/qt/bin &&
  54. #ln -v -snf ../../include/qt /usr/share/qt/include &&
  55. #ln -v -snf ../../lib /usr/share/qt/lib
  56. ln -v -snf /opt/qt-3.3.8/bin /usr/share/qt/bin &&
  57. ln -v -snf /opt/qt-3.3.8/include/qt /usr/share/qt/include &&
  58. ln -v -snf /opt/qt-3.3.8/lib /usr/share/qt/lib
  59. # 64bit
  60. cd ../qt-x11-free-3.3.8-64
  61. #    If you're X Window System prefix is something other then /usr/X11R6 then run the following command to change the hard
  62. #  coded paths in the sources:
  63. #  如果你的Xorg不是安装在 /usr/X11R6,需要运行以下命令改变 path :
  64. ####################################################################
  65. for file in $(grep -lr "X11R6" *)
  66. do
  67.     sed -i "s@/usr/X11R6@${XORG_PREFIX}@g" $file
  68. done
  69. ####################################################################
  70. #   Fix a known issue with QTSPEC linux-g++-64:
  71. sed -i "/^QMAKE_LIBDIR_QT/s:/lib:&64:" mkspecs/linux-g++-64/qmake.conf
  72. export QTDIR=$PWD &&
  73. export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &&
  74. export PATH=$PWD/bin:$PATH &&
  75. export QMAKESPEC=linux-g++-64 &&
  76. patch -Np1 -i /CBLFS/qt-3.3.8-utf8-1.patch
  77. ./configure -prefix /opt/qt-3.3.8 \
  78. -libdir /opt/qt-3.3.8/lib64 \
  79. -plugindir /opt/qt-3.3.8/lib64/plugin \
  80. -L/usr/lib64 \
  81. -sysconfdir /etc/qt \
  82. -qt-gif \
  83. -system-zlib \
  84. -system-libpng \
  85. -system-libjpeg \
  86. -system-libmng \
  87. -plugin-imgfmt-png \
  88. -plugin-imgfmt-jpeg \
  89. -plugin-imgfmt-mng \
  90. -no-exceptions \
  91. -thread \
  92. -system-nas-sound \
  93. -tablet &&
  94. make &&
  95. #    Install the package
  96. make install &&
  97. mv -v /opt/qt-3.3.8/bin/qmake{,-64} &&
  98. mv -v /opt/qt-3.3.8/bin/uic{,-64} &&
  99. mv -v /opt/qt-3.3.8/bin/moc{,-64} &&
  100. mv -v /opt/qt-3.3.8/bin/qtconfig{,-64} &&
  101. ln -svf /usr/bin/multiarch_wrapper /opt/qt-3.3.8/bin/qmake &&
  102. ln -svf /usr/bin/multiarch_wrapper /opt/qt-3.3.8/bin/uic &&
  103. ln -svf /usr/bin/multiarch_wrapper /opt/qt-3.3.8/bin/moc &&
  104. ln -svf /usr/bin/multiarch_wrapper /opt/qt-3.3.8/bin/qtconfig &&
  105. ln -sv libqt-mt.so /opt/qt-3.3.8/lib64/libqt.so &&
  106. #ln -v -snf ../../bin /usr/share/qt/bin &&
  107. #ln -v -snf ../../include/qt /usr/share/qt/include &&
  108. #ln -v -snf ../../lib /usr/share/qt/lib &&
  109. ln -v -snf /opt/qt-3.3.8/bin /usr/share/qt/bin &&
  110. ln -v -snf /opt/qt-3.3.8/include/qt /usr/share/qt/include &&
  111. ln -v -snf /opt/qt-3.3.8/lib64 /usr/share/qt/lib64 &&
  112. cp -Rv doc/man /opt/qt-3.3.8/doc &&
  113. cp -Rv examples /opt/qt-3.3.8/doc &&
  114. ln -svfn qt-3.3.8 /opt/qt
  115. # Configuring
  116. # /etc/profile.d/20-qt.sh
  117. cat > /etc/profile.d/20-qt.sh << "EOF"
  118. # Begin /etc/profile.d/20-qt.sh
  119. export QTDIR=/opt/qt-3.3.8
  120. export PATH="${PATH}:${QTDIR}/bin"
  121. export PKG_CONFIG_PATH32="${PKG_CONFIG_PATH32}${PKG_CONFIG_PATH32+:}${QTDIR}/lib/pkgconfig"
  122. export PKG_CONFIG_PATHN32="${PKG_CONFIG_PATHN32}${PKG_CONFIG_PATHN32+:}${QTDIR}/lib32/pkgconfig"
  123. export PKG_CONFIG_PATH64="${PKG_CONFIG_PATH64}${PKG_CONFIG_PATH64+:}${QTDIR}/lib64/pkgconfig"
  124. # End /etc/profile.d/20-qt.sh
  125. EOF
  126. source /etc/profile
  127. cat >> /etc/ld.so.conf << "EOF" &&
  128. # Begin qt addition to /etc/ld.so.conf
  129. /opt/qt-3.3.8/lib
  130. /opt/qt-3.3.8/lib32
  131. /opt/qt-3.3.8/lib64
  132. # End qt addition
  133. EOF
  134. ldconfig
复制代码

  0307-qt3-test ( 非必須步骤 )
  这里测试 qt3 ,需要先启X ,如果先前安装过 xorg-7.2 之后是一直在图形环境中,可以运行以下命令测试。否则,应该先在字符环境中 startx 启动 X Window System 。CBLFS手册中没有讲到需要测试,只要编译安装 qt3 之后就可以了,测试并非必須的。但为了安心,还是测试一下比较好。
  1. cat > 0307-qt3-test << "EOF"
  2. qmake
  3. designer &
  4. assistant &
  5. EOF
  6. bash 0307-qt3-tes
复制代码


KDE-Recommended

  KDE 主要依赖 X window System 和 qt 。除此之外,KDE的三个核心的软件包中 ARts 还依赖Glib2(前面安装过了);KdeLibs还需要装有Pcre;KdeBase仅需要前面两个KDE核心的软件包装上就可以了。所以现在,就已经可以着手编译 KDE 了。可以在 configure 检测的过程中注意查看屏幕上的提示信息,超过一屏的,用Shift 加上 Page up / Page down 向上/下翻屏。
  本文按照CBLFS手册,选择了少量的几个推荐安装的和可选安装的包。因为不需要与 Windows 的机器通信,所以这里没有安装 samba,不需要在KDE中加入samba支持 ;不需要打印,就没有编译cpus ;OpenEXR 不知道是啥,手册上有段说明,暂不编译( 编译KdeLibs时会提示没有安装这个 ) 。

  0401-libusb
  1. cd /sources
  2. tar xf /CBLFS/libusb-0.1.12.tar.gz
  3. cp -a libusb-0.1.12{,-64}
  4. # 32bit
  5. cd libusb-0.1.12
  6. CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
  7. ./configure --prefix=/usr \
  8.     --disable-build-docs &&
  9. make
  10. make install &&
  11. mv -v /usr/bin/libusb-config{,-32}
  12. # 64bit
  13. cd ../libusb-0.1.12-64
  14. CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
  15. ./configure --prefix=/usr \
  16.     --libdir=/usr/lib64 --disable-build-docs &&
  17. make
  18. # If you wish to build the API documentation (see the required dependencies), issue the following command:
  19. make apidox
  20. # Install the package
  21. make install &&
  22. mv -v /usr/bin/libusb-config{,-64} &&
  23. ln -sfv multiarch_wrapper /usr/bin/libusb-config
  24. # If you built the HTML user manual, install it with the following commands:
  25. #install -v -d -m755 /usr/share/doc/libusb-0.1.12/html &&
  26. #install -v -m644 doc/html/* /usr/share/doc/libusb-0.1.12/html
  27. # If you built the API documentation, install it with the following commands:
  28. install -v -d -m755 /usr/share/doc/libusb-0.1.12/apidocs &&
  29. install -v -m644 apidocs/html/* \
  30.     /usr/share/doc/libusb-0.1.12/apidocs
  31. cd ..
  32. rm -rf libusb-0.1.12{,-64}
复制代码

  0402-libtiff
  1. cd /sources
  2. tar xf /CBLFS/tiff-3.8.2.tar.gz
  3. cp -a tiff-3.8.2{,-64}
  4. # 32bit
  5. cd tiff-3.8.2
  6. CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" \
  7. USE_ARCH=32 LDFLAGS="-L/usr/lib" \
  8. ./configure --prefix=/usr &&
  9. make
  10. make install
  11. # 64bit
  12. cd ../tiff-3.8.2-64
  13. CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" \
  14. USE_ARCH=64 LDFLAGS="-L/usr/lib64" \
  15. ./configure --prefix=/usr --libdir=/usr/lib64 &&
  16. make
  17. make install
  18. cd ..
  19. rm -rf tiff-3.8.2{,-64}
复制代码

  很多软件需要 gtk2 ,这里把 gtk2 及依赖的几个包装上,省得以后麻烦。比如,firefox 、 gimp 都依赖 gtk2 。gtk2与KDE没有直接的关系。
  0403-atk
  1. cd /sources
  2. tar xf /CBLFS/atk-1.19.6.tar.bz2
  3. cp -a atk-1.19.6{,-64}
  4. # 32bit
  5. cd atk-1.19.6
  6. CC="gcc ${BUILD32}" PKG_CONFIG_PATH=$PKG_CONFIG_PATH32 \
  7.     ./configure --prefix=/usr &&
  8. make
  9. make install
  10. # 64bit
  11. cd ../atk-1.19.6-64
  12. CC="gcc ${BUILD64}" PKG_CONFIG_PATH=$PKG_CONFIG_PATH64 \
  13.     ./configure --prefix=/usr --libdir=/usr/lib64 &&
  14. make
  15. make install
  16. cd ..
  17. rm -rf atk-1.19.6{,-64}
复制代码

  0404-cairo
  1. cd /sources
  2. tar xf /CBLFS/cairo-1.4.10.tar.gz
  3. cp -a cairo-1.4.10{,-64}
  4. # 32bit
  5. cd cairo-1.4.10
  6. CC="gcc ${BUILD32}" PKG_CONFIG_PATH="$PKG_CONFIG_PATH32" \
  7. USE_ARCH=32 ./configure --prefix=/usr &&
  8. make
  9. make install
  10. # 64bit
  11. cd ../cairo-1.4.10-64
  12. CC="gcc ${BUILD64}" PKG_CONFIG_PATH="$PKG_CONFIG_PATH64" \
  13. USE_ARCH=64 ./configure --prefix=/usr --libdir=/usr/lib64 &&
  14. make
  15. make install
  16. cd ..
  17. rm -rf cairo-1.4.10{,-64}
复制代码

  0405-pango
  1. cd /sources
  2. tar xf /CBLFS/pango-1.18.1.tar.bz2
  3. cp -a pango-1.18.1{,-64}
  4. # 32bit
  5. cd pango-1.18.1
  6. #此处需要打补丁,否则后果很严重嘀说!
  7. patch -Np1 -i /CBLFS/pango-1.18.0-multilib-1.patch
  8. # The following commands make pango put it's configuration information in /etc/pango-32:
  9. sed -i "s/BUILDENV/32/" pango/pango-utils.c \
  10.     modules/Makefile.am modules/Makefile.in \
  11.     pango/Makefile.am pango/Makefile.in
  12. #Compile the package:
  13. CC="gcc ${BUILD32}" USE_ARCH=32 \
  14. PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
  15. ./configure --prefix=/usr --sysconfdir=/etc &&
  16. make
  17. #Install the package
  18. make install &&
  19. mv -v /usr/bin/pango-querymodules{,-32}
  20. # 64bit
  21. cd ../pango-1.18.1-64
  22. patch -Np1 -i /CBLFS/pango-1.18.0-multilib-1.patch
  23. sed -i "s/BUILDENV/64/" pango/pango-utils.c \
  24.     modules/Makefile.am modules/Makefile.in \
  25.     pango/Makefile.am pango/Makefile.in
  26. # Compile the package:
  27. CC="gcc ${BUILD64}" USE_ARCH=64 \
  28. PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
  29. ./configure --prefix=/usr --sysconfdir=/etc \
  30.     --libdir=/usr/lib64 &&
  31. make
  32. make install &&
  33. mv -v /usr/bin/pango-querymodules{,-64} &&
  34. ln -sfv multiarch_wrapper /usr/bin/pango-querymodules
  35. cd ..
  36. rm -rf pango-1.18.1{,-64}
复制代码

  0406-gtk2
  1. cd /sources
  2. tar xf /CBLFS/gtk+-2.11.6.tar.bz2
  3. cp -a gtk+-2.11.6{,-64}
  4. # 32bit
  5. cd gtk+-2.11.6
  6. patch -Np1 -i /CBLFS/gtk+-2.11.6-multilib-1.patch &&
  7. sed -i "s/BUILDENV/32/" gdk-pixbuf/gdk-pixbuf-io.c \
  8.     gdk-pixbuf/Makefile.am gdk-pixbuf/Makefile.in \
  9.     modules/input/Makefile.am modules/input/Makefile.in \
  10.     gtk/gtkrc.c
  11. CC="gcc ${BUILD32}" USE_ARCH=32 \
  12. PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
  13. ./configure --prefix=/usr --sysconfdir=/etc &&
  14. make
  15. make install &&
  16. mv -v /usr/bin/gdk-pixbuf-query-loaders{,-32} &&
  17. mv -v /usr/bin/gtk-query-immodules-2.0{,-32}
  18. # 64bit
  19. cd ../gtk+-2.11.6-64
  20. patch -Np1 -i /CBLFS/gtk+-2.11.6-multilib-1.patch &&
  21. sed -i "s/BUILDENV/64/" gdk-pixbuf/gdk-pixbuf-io.c \
  22.     gdk-pixbuf/Makefile.am gdk-pixbuf/Makefile.in \
  23.     modules/input/Makefile.am modules/input/Makefile.in \
  24.     gtk/gtkrc.c
  25. CC="gcc ${BUILD64}" USE_ARCH=64 \
  26. PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
  27. ./configure --prefix=/usr --libdir=/usr/lib64 \
  28.     --sysconfdir=/etc &&
  29. make
  30. make install &&
  31. mv -v /usr/bin/gdk-pixbuf-query-loaders{,-64} &&
  32. mv -v /usr/bin/gtk-query-immodules-2.0{,-64} &&
  33. ln -sfv multiarch_wrapper /usr/bin/gdk-pixbuf-query-loaders &&
  34. ln -sfv multiarch_wrapper /usr/bin/gtk-query-immodules-2.0 &&
  35. install -v -m755 -d /usr/share/doc/gtk+-2.11.6/{faq,tutorial} &&
  36. cp -v -R docs/faq/html/* /usr/share/doc/gtk+-2.11.6/faq &&
  37. cp -v -R docs/tutorial/html/* /usr/share/doc/gtk+-2.11.6/tutorial
复制代码

  0407-glib1
  有些软件会需要gtk1,这里将glib1和gtk1安装上。
  1. cd /sources
  2. tar xvf /CBLFS/glib-1.2.10.tar.gz
  3. cp -a glib-1.2.10{,-64}
  4. # 32bit
  5. cd glib-1.2.10
  6. patch -Np1 -i /CBLFS/glib-1.2.10-fixes-1.patch &&
  7. patch -Np1 -i /CBLFS/glib-1.2.10-config_update-1.patch &&
  8. CC="gcc ${BUILD32}" ./configure --prefix=/usr --host=${CLFS_TARGET32} &&
  9. make
  10. make install &&
  11. LIBNAME=$(cat gmodule/libgmodule.la | grep library_names | cut -f2 -d"'" | cut -f1 -d" ") &&
  12. chmod 755 /usr/lib/${LIBNAME} &&
  13. mv -v /usr/bin/glib-config{,-32}
  14. # 64bit
  15. cd ../glib-1.2.10-64
  16. patch -Np1 -i /CBLFS/glib-1.2.10-fixes-1.patch &&
  17. patch -Np1 -i /CBLFS/glib-1.2.10-config_update-1.patch &&
  18. CC="gcc ${BUILD64}" ./configure --prefix=/usr --libdir=/usr/lib64 &&
  19. make
  20. make install &&
  21. LIBNAME=$(cat gmodule/libgmodule.la | grep library_names | cut -f2 -d"'" | cut -f1 -d" ") &&
  22. chmod 755 /usr/lib64/${LIBNAME} &&
  23. mv -v /usr/bin/glib-config{,-64} &&
  24. ln -sfv multiarch_wrapper /usr/bin/glib-config
  25. cd ..
  26. rm -rf glib-1.2.10{,-64}
复制代码

  0408-gtk1
  1. # Required : Glib1
  2. cd /sources
  3. tar xvf /CBLFS/gtk+-1.2.10.tar.gz
  4. cp -a gtk+-1.2.10{,-64}
  5. # 32bit
  6. cd gtk+-1.2.10
  7. patch -Np1 -i /CBLFS/gtk+-1.2.10-config_update-1.patch &&
  8. patch -Np1 -i /CBLFS/gtk+-1.2.10-fixes-1.patch &&
  9. CC="gcc ${BUILD32}" USE_ARCH=32 PKG_CONFIG_PATH=${PKG_CONFIG_PATH32} \
  10. ./configure --prefix=/usr --sysconfdir=/etc \
  11.     --x-libraries=${XORG_PREFIX}/lib &&
  12. make
  13. make install &&
  14. mv -v /usr/bin/gtk-config{,-32}
  15. cd ../gtk+-1.2.10-64
  16. patch -Np1 -i /CBLFS/gtk+-1.2.10-config_update-1.patch &&
  17. patch -Np1 -i /CBLFS/gtk+-1.2.10-fixes-1.patch &&
  18. CC="gcc ${BUILD64}" USE_ARCH=64 PKG_CONFIG_PATH=${PKG_CONFIG_PATH64} \
  19.     ./configure --prefix=/usr --sysconfdir=/etc \
  20.     --libdir=/usr/lib64 --x-libraries=${XORG_PREFIX}/lib64 &&
  21. make
  22. make install &&
  23. mv -v /usr/bin/gtk-config{,-64} &&
  24. ln -sfv multiarch_wrapper /usr/bin/gtk-config &&
  25. install -v -m755 -d /usr/share/doc/gtk+-1.2.10/{html,text} &&
  26. install -v -m644 docs/html/* /usr/share/doc/gtk+-1.2.10/html &&
  27. install -v -m644 docs/text/* /usr/share/doc/gtk+-1.2.10/text
  28. cd ..
  29. rm -rf gtk+-1.2.10{,-64}
复制代码
回复 支持 反对

使用道具 举报

发表于 2007-9-13 19:50:37 | 显示全部楼层
不太清楚你想写什麽,如果是重覆 CLFS 手册的内容,可能就没太大的必要了,也许分享一下心得或注意事项会更有价值
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-9-13 20:11:58 | 显示全部楼层

KDE-3.5.7的安装过程

KDE-3.5.7的安装过程

  先少量的选择安装几个多媒体库:

  0501-Libogg

  1. cd /sources
  2. tar xf /CBLFS/libogg-1.1.3.tar.gz
  3. cp -a libogg-1.1.3{,-64}
  4. # 32bit
  5. cd libogg-1.1.3
  6. CC="gcc ${BUILD32}" ./configure --prefix=/usr &&
  7. make
  8. make install

  9. # 64bit
  10. cd ../libogg-1.1.3-64
  11. CC="gcc ${BUILD64}" ./configure --prefix=/usr --libdir=/usr/lib64 &&
  12. make
  13. make install
  14. cd ..
  15. rm -rf libogg-1.1.3{,-64}
复制代码


  0502-Libvorbis

  1. cd /sources
  2. tar xf /CBLFS/libvorbis-1.2.0.tar.bz2
  3. cp -a libvorbis-1.2.0{,-64}
  4. # 32bit
  5. cd libvorbis-1.2.0
  6. CC="gcc ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
  7. ./configure --prefix=/usr &&
  8. make
  9. make install

  10. # 64bit
  11. cd ../libvorbis-1.2.0-64
  12. CC="gcc ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
  13. ./configure --prefix=/usr --libdir=/usr/lib64 &&
  14. make
  15. make install

  16. cd ..
  17. rm -rf libvorbis-1.2.0{,-64}
复制代码


  0503-Audio_File

  1. cd /sources
  2. tar xf /CBLFS/audiofile-0.2.6.tar.gz
  3. cp -a audiofile-0.2.6{,-64}
  4. # 32bit
  5. cd audiofile-0.2.6
  6. CC="gcc ${BUILD32}" ./configure --prefix=/usr &&
  7. make
  8. make install &&
  9. mv -v /usr/bin/audiofile-config{,-32}

  10. # 64bit
  11. cd ../audiofile-0.2.6-64
  12. CC="gcc ${BUILD64}" ./configure --prefix=/usr --libdir=/usr/lib64 &&
  13. make
  14. make install &&
  15. mv -v /usr/bin/audiofile-config{,-64} &&
  16. ln -sfv multiarch_wrapper /usr/bin/audiofile-config

  17. cd ..
  18. rm -rf audiofile-0.2.6{,-64}
复制代码


  0504-Esound

  1. cd /sources
  2. tar xf /CBLFS/esound-0.2.38.tar.bz2
  3. cp -a esound-0.2.38{,-64}
  4. # 32bit
  5. cd esound-0.2.38
  6. sed -i 's@doc/esound@&-0.2.38@' configure &&
  7. CC="gcc ${BUILD32}" USE_ARCH=32 PKG_CONFIG_PATH=$PKG_CONFIG_PATH32 \
  8. ./configure --prefix=/usr --sysconfdir=/etc &&
  9. make
  10. make install &&
  11. mv -v /usr/bin/esd-config{,-32}

  12. # 64bit
  13. cd ../esound-0.2.38-64
  14. sed -i 's@doc/esound@&-0.2.38@' configure &&
  15. CC="gcc ${BUILD64}" USE_ARCH=64 PKG_CONFIG_PATH=$PKG_CONFIG_PATH64 \
  16. ./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64 &&
  17. make
  18. make install &&
  19. mv -v /usr/bin/esd-config{,-64} &&
  20. ln -sfv multiarch_wrapper /usr/bin/esd-config

  21. # If you have DocBook Utils installed, the HTML documentation should have been built. Install it with the following command:
  22. #cp -v -R docs/html /usr/share/doc/esound-0.2.38

  23. cd ..
  24. rm -rf  esound-0.2.38{,-64}
复制代码


  0505-Libmad

  1. cd /sources
  2. tar xf /CBLFS/libmad-0.15.1b.tar.gz
  3. cp -a libmad-0.15.1b{,-64}
  4. # 32bit
  5. cd libmad-0.15.1b
  6. CC="gcc ${BUILD32}" ./configure --prefix=/usr &&
  7. make
  8. make install &&
  9. mv -v /usr/include/mad{,-32}.h

  10. cat > /usr/lib/pkgconfig/mad.pc << "EOF"
  11. prefix=/usr
  12. exec_prefix=${prefix}
  13. libdir=${exec_prefix}/lib
  14. includedir=${prefix}/include

  15. Name: mad
  16. Description: MPEG audio decoder
  17. Requires:
  18. Version: 0.15.1b
  19. Libs: -L${libdir} -lmad
  20. Cflags: -I${includedir}
  21. EOF

  22. # 64bit
  23. cd ../libmad-0.15.1b-64
  24. CC="gcc ${BUILD64}" ./configure --prefix=/usr --libdir=/usr/lib64 &&
  25. make
  26. make install &&
  27. mv -v /usr/include/mad{,-64}.h

  28. cat > /usr/lib64/pkgconfig/mad.pc << "EOF"
  29. prefix=/usr
  30. exec_prefix=${prefix}
  31. libdir=${exec_prefix}/lib64
  32. includedir=${prefix}/include

  33. Name: mad
  34. Description: MPEG audio decoder
  35. Requires:
  36. Version: 0.15.1b
  37. Libs: -L${libdir} -lmad
  38. Cflags: -I${includedir}
  39. EOF

  40. cd ..
  41. rm -rf libmad-0.15.1b{,-64}

  42. #  Creating a Stub Header
  43. # 这里选择通用的,详情请看CBLFS手册。
  44. #  Creating a Generic Stub Header
  45. cat > /usr/include/mad.h << "EOF"
  46. /* mad.h - Stub Header  */
  47. #ifndef __STUB__MAD_H__
  48. #define __STUB__MAD_H__

  49. #if defined(__x86_64__) || \
  50.     defined(__sparc64__) || \
  51.     defined(__arch64__) || \
  52.     defined(__powerpc64__) || \
  53.     defined (__s390x__)
  54. # include "mad-64.h"
  55. #else
  56. # include "mad-32.h"
  57. #endif

  58. #endif /* __STUB__MAD_H__ */
  59. EOF
复制代码


  vorbis_tools 这个装上后可以将 wmv 转为 ogg 音频文件。lame 可以将 wmv 转为 mp3 。这里暂时不安装,以后需要再装不迟。
  本文不准备安装 KdeMultimedia ,而且事实上它也并不好用,更主要原因是本文的软件太新装上这个KdeMultimedia之后是无声的。我尝试过七、八次了,放弃这个既不华亦不实的巨耗时的臃肿的怪物吧!不安装它没有小喇叭, alsamixer 同样可以调节声音,前面已经提到过了。多媒体播放,只需要mplayer和realplayer就已经足够了。本文中的mplayer同样可以播放一些 real 的音/视频文件,功能不比KdeMultimedia 弱。
  现在先编译 KDE 的三个核心软件包。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表