LinuxSir.cn,穿越时空的Linuxsir!

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

小巧而优秀的迷你Linux——Slitaz的包管理方式类似于Arch

[复制链接]
发表于 2009-5-10 11:57:29 | 显示全部楼层 |阅读模式
可以从官方 http://www.slitaz.org 下载iso试用

也可以从 http://archlive-pkg.googlecode.com/files/Slitaz.tar.gz 下载打包的系统解压到本地来研究

里面有很多优秀的基于shell的图形界面程序!

欢迎大家转化为Arch的包。。。

里面/var/lib/tazpkg/installed 文件夹下面有所有安装包的 receipt ——类似于Arch的PKGBUILD。。。
下面是firefox的receipt
  1. # SliTaz package receipt.
  2. PACKED_SIZE="7.9M"
  3. UNPACKED_SIZE="22.3M"
  4. PACKAGE="firefox"
  5. VERSION="3.0.8"
  6. CATEGORY="network"
  7. SHORT_DESC="User friendly, secure and fast web browser."
  8. MAINTAINER="pankso@slitaz.org"
  9. DEPENDS="gtk+ sqlite dbus dbus-glib glib jpeg xorg-libX11 xorg-libXdamage"
  10. BUILD_DEPENDS="xorg-dev gtk+-dev zip libIDL coreutils findutils xorg-libXft-dev dbus-glib-dev"
  11. TARBALL="$PACKAGE-$VERSION-source.tar.bz2"
  12. WEB_SITE="http://www.mozilla.org/"
  13. WGET_URL="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL"
  14. CONFIG_FILES="/etc/firefox"
  15. # Rules to configure and make the package.
  16. #
  17. # A long compile time... dont forget to build libidl before and check the
  18. # .mozconfig file from the stuff and the stuff/README document.
  19. #
  20. compile_rules()
  21. {
  22.         # Move the mozilla source tree to $PACKAGE-$VERSION to keep variables
  23.         # and to have a nice clean.
  24.         #
  25.         mv mozilla $PACKAGE-$VERSION
  26.         cp -a stuff/firefox.mozconfig $src/.mozconfig
  27.         cd $src
  28.         ./configure $CONFIGURE_ARGS &&
  29.         make &&
  30.         make DESTDIR=$PWD/_pkg install
  31. }
  32. # Rules to gen a SliTaz package suitable for Tazpkg.
  33. genpkg_rules()
  34. {
  35.         mkdir -p $fs/usr/lib $fs/usr/share $fs/etc
  36.         cp -a $_pkg/usr/bin $fs/usr
  37.         cp -a $_pkg/usr/lib/$PACKAGE-$VERSION $fs/usr/lib
  38.         # SliTaz Web site for the home page, bookmarks file and branding.
  39.         cp -a stuff/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION
  40.         cp -a stuff/bookmarks.html $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile
  41.         cp -a stuff/firefox-branding.js \
  42.                 $fs/usr/lib/$PACKAGE-$VERSION/defaults/pref/
  43.         # User preference.
  44.         cp -a stuff/prefs.js $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile
  45.         cp -a stuff/userChrome.css \
  46.                 $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile/chrome
  47.         # Move default config to /etc/firefox (/usr maybe read-only)
  48.         for i in defaults browserconfig.properties ; do
  49.                 mv -f $fs/usr/lib/$PACKAGE-$VERSION/$i $fs/etc/$PACKAGE
  50.         done
  51.         ln -s /etc/$PACKAGE/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION
  52.         ln -s /etc/$PACKAGE $fs/usr/lib/$PACKAGE-$VERSION/defaults
  53.        
  54.         # EULA is accepted by SliTaz project.
  55.         sed -i s:'pref("browser.EULA.3.accepted", false);':'pref("browser.EULA.3.accepted", true);': \
  56.                 $fs/etc/firefox/pref/firefox.js
  57.         # Locale fr
  58.         tar xjf stuff/langpack-fr@firefox.mozilla.org.tar.bz2 \
  59.                 -C $fs/usr/lib/$PACKAGE-$VERSION/extensions
  60.         sed -i "s/maxVersion>3.0../maxVersion>$VERSION/" \
  61.                 $fs/usr/lib/$PACKAGE-$VERSION/extensions/langpack*/install.rdf
  62.                
  63.         # Search Plugin (by: oddball)
  64.         cp -a stuff/searchplugins $fs/usr/lib/firefox-$VERSION/
  65.         chown -R root.root $fs
  66.         # Remove unnecessary files.
  67.         rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries/*
  68.         rm -rf $fs/usr/lib/$PACKAGE-$VERSION/icons
  69.         rm -rf $fs/usr/lib/$PACKAGE-$VERSION/libsqlite3.so
  70. }
  71. # Pre - Post install command to set default locale.
  72. pre_install()
  73. {
  74.         local root
  75.         root=$1
  76.         # Get old plugins
  77.         mkdir /tmp/firefox-plugins-$$
  78.         cp -a $root/usr/lib/firefox-*/plugins/* /tmp/firefox-plugins-$$ 2> /dev/null
  79.         # Remove old libs
  80.         rm -rf $root/usr/lib/firefox-*
  81. }
  82. post_install()
  83. {
  84.         local root
  85.         root=$1
  86.         if grep -q "fr_*" $root/etc/locale.conf 2>/dev/null; then
  87.                 sed -i 's/en-US/fr/' \
  88.                 $root/etc/firefox/pref/firefox-l10n.js
  89.         fi
  90.         for i in /tmp/firefox-plugins-$$/* ; do
  91.                 [ -e $i ] || continue
  92.                 [ -e /usr/lib/firefox-*/plugins/$(basename $i) ] && continue
  93.                 cp -a $i /usr/lib/firefox-*/plugins/
  94.         done
  95.         rm -rf /tmp/firefox-plugins-$$
  96. }
复制代码

Slitaz也支持从源代码编译,软件可以平滑升级,但内核暂时还未定。。。——有时间研究下其内核机理。。。
升级一个最新的内核。。。
发表于 2009-5-10 12:01:50 | 显示全部楼层
居然压缩包和解压大小都要自己写。。

基于shell的图形界面程序?zenity?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-5-10 12:19:04 | 显示全部楼层
不用自己写的,打包的时候加上去的。。。

刚才看了下,利用linux-live的脚本,稍微修改,就可以制作类似于Slitaz的live系统了

www.linux-live.org
回复 支持 反对

使用道具 举报

发表于 2009-5-10 13:31:21 | 显示全部楼层
Arch有黏性,我离不开
回复 支持 反对

使用道具 举报

发表于 2009-5-10 14:24:14 | 显示全部楼层
MIni区里有不少slitaz的帖子   
许许多多的组建构成了默认的Slitaz桌面,JWM和Lxpanel(Cooking版中是Openbox和Lxpanel)可以给你带来一个简朴的多功能桌面
JWM is a window manager for the X11 Window System. JWM is written in C and uses only Xlib at a minimum. The following libraries can also be used if available :

“小巧快速”  很有诱惑
Tazpkg - 软件包管理器 是要自己本地编译的?
回复 支持 反对

使用道具 举报

发表于 2009-5-10 14:28:59 | 显示全部楼层
我進slitaz  試了下  感覺做的lxde好漂亮,想想arch默認安裝的lxde,天差地別阿
回复 支持 反对

使用道具 举报

发表于 2009-5-10 14:36:04 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2009-5-10 22:42:07 | 显示全部楼层
Post by qiii2006;1985647
我進slitaz  試了下  感覺做的lxde好漂亮,想想arch默認安裝的lxde,天差地別阿
给张slitaz下的LXDE截图吧。
我的虚拟机下装了debian的LXDE,默认和Arch下的一样。也许是slitaz针对LXDE的界面进行了美化吧。
回复 支持 反对

使用道具 举报

发表于 2009-5-11 07:06:09 | 显示全部楼层
资料很少,观望。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-5-11 09:24:45 | 显示全部楼层
Post by fmying;1985801
给张slitaz下的LXDE截图吧。
我的虚拟机下装了debian的LXDE,默认和Arch下的一样。也许是slitaz针对LXDE的界面进行了美化吧。



不在于界面如何漂亮,关键是快速、小巧。。。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

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

本版积分规则

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