Chinaunix首页 | 论坛 | 博客
  • 博客访问: 333473
  • 博文数量: 53
  • 博客积分: 1037
  • 博客等级: 准尉
  • 技术积分: 1066
  • 用 户 组: 普通用户
  • 注册时间: 2012-05-13 14:09
文章分类

全部博文(53)

文章存档

2016年(1)

2015年(10)

2013年(2)

2012年(40)

分类: LINUX

2012-11-07 21:38:28

Step 1. 从下面的网址下载 pacman 源代码


比如下载 到某个文件夹 pacman/

然后解压缩


  1. tar xzvf pacman-4.0.3.tar.gz
在 pacman/ 目录下得到了一个 pacman-4.0.3/ 的子文件夹, 我们列出其中的内容.

  1. [haifeng@arch pacman-4.0.3]$ ls
  2. acinclude.m4 config.rpath depcomp install-sh missing scripts/
  3. AUTHORS config.sub doc/ lib/ mkinstalldirs src/
  4. autoclean.sh configure.ac etc/ ltmain.sh NEWS test/
  5. autogen.sh contrib/ HACKING m4/ proto/ TRANSLATORS
  6. config.guess COPYING INSTALL Makefile.am README valgrind.supp
执行其中的 autogen.sh 命令,

  1. [haifeng@arch pacman-4.0.3]$ ./autogen.sh
  2. + aclocal -I m4 --install
  3. + autoheader
  4. + automake --foreign
  5. configure.ac:138: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and will soon be removed.
  6. configure.ac:138: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead,
  7. configure.ac:138: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.
  8. src/pacman/Makefile.am:20: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
  9. src/util/Makefile.am:14: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
  10. + autoconf
将生成 configure 和其他文件, 下面是多出来的文件(夹).

  1. aclocal.m4
    autom4te.cache/
    config.h.in
  2. configure
  3. Makefile.in
然后执行 configure

点击(此处)折叠或打开

  1. [haifeng@arch pacman-4.0.3]$ ./configure
  2. checking build system type... x86_64-unknown-linux-gnu
  3. checking host system type... x86_64-unknown-linux-gnu
  4. checking for a BSD-compatible install... /usr/bin/install -c
  5. checking whether build environment is sane... yes
  6. checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
  7. checking for gawk... gawk
  8. checking whether make sets $(MAKE)... yes
  9. checking for style of include used by make... GNU
  10. checking for gcc... gcc
  11. checking whether the C compiler works... yes
  12. checking for C compiler default output file name... a.out
  13. checking for suffix of executables...
  14. checking whether we are cross compiling... no
  15. checking for suffix of object files... o
  16. checking whether we are using the GNU C compiler... yes
  17. checking whether gcc accepts -g... yes
  18. checking for gcc option to accept ISO C89... none needed
  19. checking dependency style of gcc... gcc3
  20. checking for gawk... (cached) gawk
  21. checking for curl-config... /usr/bin/curl-config
  22. checking for the version of libcurl... 7.28.0
  23. checking for libcurl >= version 7.19.4... yes
  24. checking whether libcurl is usable... yes
  25. checking for curl_free... yes
  26. checking for gawk... (cached) gawk
  27. checking for gcc option to accept ISO C99... -std=gnu99
  28. checking for g++... g++
  29. checking whether we are using the GNU C++ compiler... yes
  30. checking whether g++ accepts -g... yes
  31. checking dependency style of g++... gcc3
  32. checking whether ln -s works... yes
  33. checking whether make sets $(MAKE)... (cached) yes
  34. checking how to print strings... printf
  35. checking for a sed that does not truncate output... /bin/sed
  36. checking for grep that handles long lines and -e... /usr/bin/grep
  37. checking for egrep... /usr/bin/grep -E
  38. checking for fgrep... /usr/bin/grep -F
  39. checking for ld used by gcc -std=gnu99... /usr/bin/ld
  40. checking if the linker (/usr/bin/ld) is GNU ld... yes
  41. checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
  42. checking the name lister (/usr/bin/nm -B) interface... BSD nm
  43. checking the maximum length of command line arguments... 1572864
  44. checking whether the shell understands some XSI constructs... yes
  45. checking whether the shell understands "+="... yes
  46. checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
  47. checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
  48. checking for /usr/bin/ld option to reload object files... -r
  49. checking for objdump... objdump
  50. checking how to recognize dependent libraries... pass_all
  51. checking for dlltool... no
  52. checking how to associate runtime and link libraries... printf %s\n
  53. checking for ar... ar
  54. checking for archiver @FILE support... @
  55. checking for strip... strip
  56. checking for ranlib... ranlib
  57. checking command to parse /usr/bin/nm -B output from gcc -std=gnu99 object... ok
  58. checking for sysroot... no
  59. checking for mt... no
  60. checking if : is a manifest tool... no
  61. checking how to run the C preprocessor... gcc -std=gnu99 -E
  62. checking for ANSI C header files... yes
  63. checking for sys/types.h... yes
  64. checking for sys/stat.h... yes
  65. checking for stdlib.h... yes
  66. checking for string.h... yes
  67. checking for memory.h... yes
  68. checking for strings.h... yes
  69. checking for inttypes.h... yes
  70. checking for stdint.h... yes
  71. checking for unistd.h... yes
  72. checking for dlfcn.h... yes
  73. checking for objdir... .libs
  74. checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no
  75. checking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC
  76. checking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... yes
  77. checking if gcc -std=gnu99 static flag -static works... yes
  78. checking if gcc -std=gnu99 supports -c -o file.o... yes
  79. checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes
  80. checking whether the gcc -std=gnu99 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
  81. checking whether -lc should be explicitly linked in... no
  82. checking dynamic linker characteristics... GNU/Linux ld.so
  83. checking how to hardcode library paths into programs... immediate
  84. checking whether stripping libraries is possible... yes
  85. checking if libtool supports shared libraries... yes
  86. checking whether to build shared libraries... yes
  87. checking whether to build static libraries... yes
  88. checking how to run the C++ preprocessor... g++ -E
  89. checking for ld used by g++... /usr/bin/ld -m elf_x86_64
  90. checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
  91. checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
  92. checking for g++ option to produce PIC... -fPIC -DPIC
  93. checking if g++ PIC flag -fPIC -DPIC works... yes
  94. checking if g++ static flag -static works... yes
  95. checking if g++ supports -c -o file.o... yes
  96. checking if g++ supports -c -o file.o... (cached) yes
  97. checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
  98. checking dynamic linker characteristics... (cached) GNU/Linux ld.so
  99. checking how to hardcode library paths into programs... immediate
  100. checking for ranlib... (cached) ranlib
  101. checking for python2.7... python2.7
  102. checking for bash... /bin/bash
  103. checking whether NLS is requested... yes
  104. checking for msgfmt... /usr/bin/msgfmt
  105. checking for gmsgfmt... /usr/bin/msgfmt
  106. checking for xgettext... /usr/bin/xgettext
  107. checking for msgmerge... /usr/bin/msgmerge
  108. checking for ld used by GCC... /usr/bin/ld -m elf_x86_64
  109. checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
  110. checking for shared library run path origin... done
  111. checking for CFPreferencesCopyAppValue... no
  112. checking for CFLocaleCopyCurrent... no
  113. checking for GNU gettext in libc... yes
  114. checking whether to use NLS... yes
  115. checking where the gettext function comes from... libc
  116. checking for fabs in -lm... yes
  117. checking for archive_read_data in -larchive... yes
  118. checking whether to link with libssl... yes
  119. checking for MD5_Final in -lssl... yes
  120. checking whether to link with libgpgme... yes
  121. checking for gpgme_check_version in -lgpgme... yes
  122. checking fcntl.h usability... yes
  123. checking fcntl.h presence... yes
  124. checking for fcntl.h... yes
  125. checking float.h usability... yes
  126. checking float.h presence... yes
  127. checking for float.h... yes
  128. checking glob.h usability... yes
  129. checking glob.h presence... yes
  130. checking for glob.h... yes
  131. checking libintl.h usability... yes
  132. checking libintl.h presence... yes
  133. checking for libintl.h... yes
  134. checking limits.h usability... yes
  135. checking limits.h presence... yes
  136. checking for limits.h... yes
  137. checking locale.h usability... yes
  138. checking locale.h presence... yes
  139. checking for locale.h... yes
  140. checking mntent.h usability... yes
  141. checking mntent.h presence... yes
  142. checking for mntent.h... yes
  143. checking netinet/in.h usability... yes
  144. checking netinet/in.h presence... yes
  145. checking for netinet/in.h... yes
  146. checking netinet/tcp.h usability... yes
  147. checking netinet/tcp.h presence... yes
  148. checking for netinet/tcp.h... yes
  149. checking stddef.h usability... yes
  150. checking stddef.h presence... yes
  151. checking for stddef.h... yes
  152. checking for string.h... (cached) yes
  153. checking sys/ioctl.h usability... yes
  154. checking sys/ioctl.h presence... yes
  155. checking for sys/ioctl.h... yes
  156. checking sys/mnttab.h usability... no
  157. checking sys/mnttab.h presence... no
  158. checking for sys/mnttab.h... no
  159. checking sys/mount.h usability... yes
  160. checking sys/mount.h presence... yes
  161. checking for sys/mount.h... yes
  162. checking sys/param.h usability... yes
  163. checking sys/param.h presence... yes
  164. checking for sys/param.h... yes
  165. checking sys/statvfs.h usability... yes
  166. checking sys/statvfs.h presence... yes
  167. checking for sys/statvfs.h... yes
  168. checking sys/time.h usability... yes
  169. checking sys/time.h presence... yes
  170. checking for sys/time.h... yes
  171. checking for sys/types.h... (cached) yes
  172. checking sys/ucred.h usability... no
  173. checking sys/ucred.h presence... no
  174. checking for sys/ucred.h... no
  175. checking syslog.h usability... yes
  176. checking syslog.h presence... yes
  177. checking for syslog.h... yes
  178. checking termios.h usability... yes
  179. checking termios.h presence... yes
  180. checking for termios.h... yes
  181. checking wchar.h usability... yes
  182. checking wchar.h presence... yes
  183. checking for wchar.h... yes
  184. checking for inline... inline
  185. checking for int64_t... yes
  186. checking for mode_t... yes
  187. checking for off_t... yes
  188. checking for pid_t... yes
  189. checking for size_t... yes
  190. checking for ssize_t... yes
  191. checking whether struct tm is in sys/time.h or time.h... time.h
  192. checking for uid_t in sys/types.h... yes
  193. checking for dirent.h that defines DIR... yes
  194. checking for library containing opendir... none required
  195. checking for struct dirent.d_type... yes
  196. checking PATH_MAX defined... yes
  197. checking vfork.h usability... no
  198. checking vfork.h presence... no
  199. checking for vfork.h... no
  200. checking for fork... yes
  201. checking for vfork... yes
  202. checking for working fork... yes
  203. checking for working vfork... (cached) yes
  204. checking for library containing getmntent... none required
  205. checking whether lstat correctly handles trailing slash... yes
  206. checking for stdlib.h... (cached) yes
  207. checking for GNU libc compatible malloc... yes
  208. checking whether time.h and sys/time.h may both be included... yes
  209. checking for sys/time.h... (cached) yes
  210. checking for unistd.h... (cached) yes
  211. checking for alarm... yes
  212. checking for working mktime... yes
  213. checking for working strcoll... yes
  214. checking for dup2... yes
  215. checking for getcwd... yes
  216. checking for geteuid... yes
  217. checking for getmntinfo... no
  218. checking for gettimeofday... yes
  219. checking for memmove... yes
  220. checking for memset... yes
  221. checking for mkdir... yes
  222. checking for realpath... yes
  223. checking for regcomp... yes
  224. checking for rmdir... yes
  225. checking for setenv... yes
  226. checking for setlocale... yes
  227. checking for strcasecmp... yes
  228. checking for strchr... yes
  229. checking for strcspn... yes
  230. checking for strdup... yes
  231. checking for strerror... yes
  232. checking for strndup... yes
  233. checking for strrchr... yes
  234. checking for strsep... yes
  235. checking for strstr... yes
  236. checking for strtol... yes
  237. checking for swprintf... yes
  238. checking for tcflush... yes
  239. checking for wcwidth... yes
  240. checking for uname... yes
  241. checking filesystem statistics type... checking for getmntinfo... (cached) no
  242. checking for getmntent... (cached) yes
  243. struct statvfs
  244. checking for struct statvfs.f_flag... yes
  245. checking for struct statfs.f_flags... no
  246. checking for special C compiler options needed for large files... no
  247. checking for _FILE_OFFSET_BITS value needed for large files... no
  248. checking whether gcc -std=gnu99 accepts -fvisibility=internal... yes
  249. checking for -fgnu89-inline... yes
  250. checking for du... /usr/bin/du
  251. checking for asciidoc... no
  252. checking for building documentation... yes (warning : asciidoc not installed)
  253. checking for doxygen... no
  254. checking for doxygen... no, disabled by configure
  255. checking for debug mode request... no
  256. checking whether to use git version if available... no, disabled by configure
  257. checking that generated files are newer than configure... done
  258. configure: creating ./config.status
  259. config.status: creating lib/libalpm/Makefile
  260. config.status: creating lib/libalpm/po/Makefile.in
  261. config.status: creating src/pacman/Makefile
  262. config.status: creating src/pacman/po/Makefile.in
  263. config.status: creating src/util/Makefile
  264. config.status: creating scripts/Makefile
  265. config.status: creating scripts/po/Makefile.in
  266. config.status: creating doc/Makefile
  267. config.status: creating etc/Makefile
  268. config.status: creating test/pacman/Makefile
  269. config.status: creating test/pacman/tests/Makefile
  270. config.status: creating test/util/Makefile
  271. config.status: creating contrib/Makefile
  272. config.status: creating Makefile
  273. config.status: creating config.h
  274. config.status: executing depfiles commands
  275. config.status: executing libtool commands
  276. config.status: executing po-directories commands
  277. config.status: creating lib/libalpm/po/POTFILES
  278. config.status: creating lib/libalpm/po/Makefile
  279. config.status: creating src/pacman/po/POTFILES
  280. config.status: creating src/pacman/po/Makefile
  281. config.status: creating scripts/po/POTFILES
  282. config.status: creating scripts/po/Makefile

  283. pacman:

  284. Build information:
  285. source code location : .
  286. prefix : /usr/local
  287. sysconfdir : /usr/local/etc
  288. conf file : /usr/local/etc/pacman.conf
  289. localstatedir : /usr/local/var
  290. database dir : /usr/local/var/lib/pacman/
  291. cache dir : /usr/local/var/cache/pacman/pkg/

  292. compiler : gcc -std=gnu99
  293. preprocessor flags :
  294. compiler flags : -g -O2 -Wall
  295. defines : -DHAVE_CONFIG_H
  296. library flags : -lgpgme -lssl -larchive -lm
  297. linker flags :

  298. Architecture : x86_64
  299. Host Type : x86_64-unknown-linux-gnu
  300. Filesize command : stat -c %s
  301. In-place sed command : sed -i

  302. libalpm version : 7.0.3
  303. libalpm version info : 7:3:0
  304. pacman version : 4.0.3
  305. using git version : no

  306. Directory and file information:
  307. root working directory : /
  308. package extension : .pkg.tar.gz
  309. source pkg extension : .src.tar.gz
  310. build script name : PKGBUILD

  311. Compilation options:
  312. Use libcurl : yes
  313. Use GPGME : yes
  314. Use OpenSSL : yes
  315. Run make in doc/ dir : yes (warning : asciidoc not installed)
  316. Doxygen support : no
  317. debug support : no

---------------------------------------

安装 asciidoc 软件包, 并重新运行 ./configure

[haifeng@arch pacman-4.0.3]$ sudo pacman -S asciidoc
[sudo] password for haifeng:
正在解决依赖关系...
正在查找内部冲突...

目标 (1): asciidoc-8.6.8-1

全部下载大小:0.16 MiB
全部安装大小:0.97 MiB

进行安装吗? [Y/n] y
:: 正在从 community 软件库获取软件包...
 asciidoc-8.6.8-1-any       166.4 KiB   475K/s 00:00 [###########################] 100%
(1/1) 正在检查软件包完整性                           [###########################] 100%
(1/1) 正在加载软件包文件                             [###########################] 100%
(1/1) 正在检查文件冲突                               [###########################] 100%
(1/1) 正在检查可用硬盘空间                           [###########################] 100%
(1/1) 正在安装 asciidoc                              [###########################] 100%
asciidoc 的可选依赖
    lilypond: music-filter
    imagemagick: music-filter (used in conjunction with lilypond)
    source-highlight: source-highlight-filter
    dblatex: pdf generation
    fop: alternative pdf generation
    lynx: text generation
    w3m: text generation (alternative to lynx)

--------------------------------------------------

[haifeng@arch pacman-4.0.3]$ ./configure
[haifeng@arch pacman-4.0.3]$ cd doc
[haifeng@arch pacman-4.0.3]$ make

结果比原来 doc/ 中多了十个文件.

libalpm.3, makepkg.8, makepkg.conf.5, pacman-key.8, pacman.8,

pacman.conf.5, PKGBUILD.5, pkgdelta.8, repo-add.8, vercmp.8

多了下面几个文件, 特别是 Makefileconfig.h. 其中 config.hsrc/ 中好多文件包含.

  1. config.h
  2. config.log
  3. config.status
  4. libtool
  5. Makefile
  6. stamp-h1
接下来, 就可以 make, sudo make install 来安装了.

注:

打开 config.h 文件, 就会发现其头两行写着该文件及 config.h.in 的来源.

/* config.h.  Generated from config.h.in by configure.  */
/* config.h.in.  Generated from configure.ac by autoheader.  */





阅读(5483) | 评论(0) | 转发(0) |
0

上一篇:documents about archlinux

下一篇:UML 编辑器

给主人留下些什么吧!~~