#!/bin/bash ## src2pkg script for: scim ## Auto-generated by src2pkg-2.1 ## src2pkg - Copyright 2005-2009 Gilbert Ashley # Adapted from the scim.SlackBuild by Eric Hameleers # See the end of this file for the full Copyright and License info SOURCE_NAME='scim-1.4.9.tar.gz' NAME='scim' # Use ALT_NAME to override guessed value VERSION='1.4.9' # Use ALT_VERSION to override guessed value # ARCH='' # BUILD='1' # PRE_FIX='usr' # Any extra options go here: EXTRA_CONFIGS="--sysconfdir=/etc --enable-gtk2-immodule \ --enable-panel-gtk2" PATCHLIST='scim-patches/scim-invalid_char_type.diff' # Optional function replaces configure_source, compile_source, fake_install # To use, uncomment and write/paste CODE between the {} brackets. # build() { CODE } # Get the functions and configs . /usr/libexec/src2pkg/FUNCTIONS ; # Execute the named packaging steps: pre_process find_source make_dirs unpack_source fix_source_perms configure_source # compile_source # If used, the 'build' function replaces these 3 fake_install # rm -rf $PKG_DIR/usr/share/control-center-2.0 # Add a profile script that sets up the environment: mkdir -p $PKG_DIR/etc/profile.d cat < $PKG_DIR/etc/profile.d/scim.sh.new #!/bin/sh # SCIM (Smart Common Input Method platform). This is used to support the # entering of text in non-US-English languages. # For SCIM to work, you need to use a UTF-8 locale. Make sure it ends in # ".UTF-8", not "utf-8"! As an example, you would need to use en_US.UTF-8 # for a US locale (export LANG=en_US.UTF-8), not en_US. # # The locale (LANG variable) is set in /etc/profile.d/lang.sh. if [ -x /usr/bin/scim ]; then # Enable legacy X applications to use scim: export XMODIFIERS="@im=SCIM" ## Enable Qt/KDE applications to use scim (not working with kde4): #export QT_IM_MODULE="scim" # Make scim start automatically if the "magic key" Ctrl-Space is pressed: export XIM_PROGRAM="/usr/bin/scim -d" fi if [ -x /usr/bin/scim-bridge ]; then # Let GTK applications like Firefox/Thunderbird use scim-bridge as # default immodule: export GTK_IM_MODULE="scim-bridge" # Enable Qt4/KDE4 applications to use scim: export QT_IM_MODULE="scim-bridge" fi # This ensures scim starts when you logon. # This will only work if you login through runlevel 4 (graphical login)!!! # Better is to have it start through Ctrl-Space like configured higher up ^^. #if [ ! \`ls /tmp/scim-socket*\` ]; then # /usr/bin/scim -d #fi # GTK+ environments such as XFce should support SCIM automatically, BUT # if the first app you run is a Qt one, you'll run into problems. This # can be avoided by going into Menu -> Settings -> Autostarted Applications # and adding SCIM: /usr/bin/scim -d # KDE will not start SCIM automatically, so you will need a script such as # this one in your $HOME/.kde/Autostart: #!/bin/bash #if [ -x /usr/bin/scim ]; then # /usr/bin/scim -d & #fi # Obviously, uncomment all but the first line. :-) EOT chmod 755 $PKG_DIR/etc/profile.d/scim.sh.new mkdir -p $PKG_DIR/usr/share/applications cat $PATCHES_DIR/$NAME-patches/scim.desktop > $PKG_DIR/usr/share/applications/scim.desktop cat $PATCHES_DIR/$NAME-patches/scim-setup.desktop > $PKG_DIR/usr/share/applications/scim-setup.desktop mkdir -p $PKG_DIR/usr/share/icons/hicolor/48x48/apps cp $SRC_DIR/data/pixmaps/scim-setup.png $PKG_DIR/usr/share/icons/hicolor/48x48/apps # Protect config files from being overwritten: mv $PKG_DIR/etc/scim/config{,.new} mv $PKG_DIR/etc/scim/global{,.new} # Add documentation: mkdir -p $PKG_DIR/usr/share/doc/$NAME-$VERSION/manual/zh_CN/figures cp -a \ ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO \ $PKG_DIR/usr/share/doc/$NAME-$VERSION # Install documentation and user manual cp -a docs/manual/zh_CN/user-manual.html \ $PKG_DIR/usr/share/doc/$NAME-$VERSION/manual/zh_CN/ cp -a docs/manual/zh_CN/figures/*.png \ $PKG_DIR/usr/share/doc/$NAME-$VERSION/manual/zh_CN/figures/ fix_pkg_perms strip_bins create_docs compress_man_pages make_description make_doinst make_package post_process # Original Copyright info: # Copyright 2006,2007,2008 Eric Hameleers, Eindhoven, NL # Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN USA # All rights reserved. # # Permission to use, copy, modify, and distribute this software for # any purpose with or without fee is hereby granted, provided that # the above copyright notice and this permission notice appear in all # copies. # # THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # ----------------------------------------------------------------------------- # # Slackware SlackBuild script # =========================== # By: Eric Hameleers # For: scim # Descr: Smart Common Input Method platform # URL: http://www.scim-im.org/ # # -----------------------------------------------------------------------------