Arch Linux 的套件編譯管理方便,讓我覺得有機會掌握, 因此試著將 Arch Linux 的 pacman 編譯進去網樂通.如果成功就有 10197(官方)+39902(aur)個套件可以編了.
請見最新發展.
雖然在PC端編譯較快,但是因為若套件源碼非 autoconf,則必須要手動調整Makefile. 所以先嘗試在網樂通裡面直接編譯吧!總共編了六個相依性套件!
理論上這些編好的套件也可以用在 PC 作 cross compile 之用. 不過要手動解壓縮到對應的目錄
- pacman: 'bash' 'glibc>=2.15' 'libarchive>=3.0.2' 'curl>=7.19.4' 'gpgme' 'pacman-mirrorlist' 'archlinux-keyring'
- libarchive OK:'zlib' 'bzip2' 'xz>=5.0.0' 'acl' 'openssl>=1.0.0' 'expat'
- xz: OK 裝好後,要刪除之前busybox的版本指令為 rm /bin/xz*
- acl:OK attr
- attr: OK gettext
- gettext: OK
- 編譯過程需要 ar 支援 -u, 雖然有安裝 stlinux23-sh4-binutils, 但是還要記得移掉busybox精簡版的ar, 指令為 rm /bin/ar
編好的檔案都以 txz 命名就可以使用 shpkg -U xxx.txz 安裝.
上回編好 pacman 的相依性程式庫後, 發現編好的 pacman 還是不能運作.
在 shpkg 引入 fedora 套件並加上 -E 選項之後, 在網樂通上編譯變得簡單些了.
$ pacman -Sg base-devel
base-devel autoconf
base-devel automake
base-devel binutils (stlinux23-sh4-binutils stlinux23-sh4-binutils-dev
base-devel bison (bison bison-devel)
base-devel fakeroot
base-devel flex (stlinux23-sh4-flex-dev)
base-devel gawk (stlinux23-sh4-gawk)
base-devel gcc (stlinux23-sh4-gcc)
base-devel gettext (sh4twbox)
base-devel libtool
base-devel m4
base-devel make (stlinux23-sh4-make)
base-devel patch (patch patchutils)
base-devel pkg-config (pkgconfig)
Build Readline 6.1
Build Bash 4.0 : stlinux23-sh4-ncurses-dev (readline 6.1)
Build curl # undefined reference to `curl_easy_escape'
sudo makepkg --asroot -Ad --skippgpcheck
pacman -Udd curl-7.28.1-1-sh4.pkg.tar.gz
Build package-query: yajl curl(stlinux23-sh4-curl-dev stlinux23-sh4-curl-libs) openssl(stlinux23-sh4-openssl stlinux23-sh4-openssl-dev)
makepkg --asroot -Ad --skipchecksums
sudo pacman -Udd package-query-1.1-2-sh4.pkg.tar.gzRun yaourt (stlinux23-sh4-coreutils, rm /bin/readlink)
上回編好 pacman 的相依性程式庫後, 發現編好的 pacman 還是不能運作.
在 shpkg 引入 fedora 套件並加上 -E 選項之後, 在網樂通上編譯變得簡單些了.
安裝archlinux base-devel 對應的 fedora 套件
ref: http://archlinuxarm.org/developers/building-packages$ pacman -Sg base-devel
base-devel autoconf
base-devel automake
base-devel binutils (stlinux23-sh4-binutils stlinux23-sh4-binutils-dev
base-devel bison (bison bison-devel)
base-devel fakeroot
base-devel flex (stlinux23-sh4-flex-dev)
base-devel gawk (stlinux23-sh4-gawk)
base-devel gcc (stlinux23-sh4-gcc)
base-devel gettext (sh4twbox)
base-devel libtool
base-devel m4
base-devel make (stlinux23-sh4-make)
base-devel patch (patch patchutils)
base-devel pkg-config (pkgconfig)
重新編譯 pacman
Tips: when configure failed, check the config.log
required packages: libarchive stlinux23-sh4-libexpat stlinux23-sh4-bzip2 stlinux23-sh4-bzip2-dev
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --without-gpgme
required packages: libarchive stlinux23-sh4-libexpat stlinux23-sh4-bzip2 stlinux23-sh4-bzip2-dev
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --without-gpgme
make
make check # 3 cases failed
sudo make DESTDIR=$PWD/../../pkg install
make check # 3 cases failed
sudo make DESTDIR=$PWD/../../pkg install
發現 bash 沒有升級到 4.0 pacman 套件的 makepkg 無法正常運作
Build Readline 6.1
Build Bash 4.0 : stlinux23-sh4-ncurses-dev (readline 6.1)
Build yaourt
Build yajlsudo makepkg --asroot -AdBuild curl # undefined reference to `curl_easy_escape'
sudo makepkg --asroot -Ad --skippgpcheck
pacman -Udd curl-7.28.1-1-sh4.pkg.tar.gz
Build package-query: yajl curl(stlinux23-sh4-curl-dev stlinux23-sh4-curl-libs) openssl(stlinux23-sh4-openssl stlinux23-sh4-openssl-dev)
makepkg --asroot -Ad --skipchecksums
sudo pacman -Udd package-query-1.1-2-sh4.pkg.tar.gzRun yaourt (stlinux23-sh4-coreutils, rm /bin/readlink)
沒有留言:
張貼留言