#!/bin/sh # Install Publican package and dependencies to Slackware 13.37 # Set Publican to work correctly # optional install and set publican-SalixOS from svn # # # Just run this script and you are ready # # must be run as root # # # script made by Dimitris Tzemos # # if [ $(id -ru) -ne 0 ]; then echo "You need to be root to run this script." exit 1 fi #install rpm2tgz if it does not exist in the system if ! [ -x /usr/bin/rpm2targz ]; then slapt-get -y -i --reinstall rpm2tgz fi CWD=$(pwd) if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 LIBDIRSUFFIX="" THREADDIR="i486" ;; # arm*) ARCH=arm ;; *) ARCH=$( uname -m ) LIBDIRSUFFIX="64" THREADDIR="x86_64" ;; esac fi echo $LIBDIRSUFFIX echo $THREADDIR # and so it begins... perl -MCPAN -e 'install Devel::Cover' ## commented modules are already present in default Slackware #perl -MCPAN -e 'install Module::Build' #perl -MCPAN -e 'install Test::Exception' perl -MCPAN -e 'install Test::More' perl -MCPAN -e 'install Test::Pod' perl -MCPAN -e 'install Test::Pod::Coverage' perl -MCPAN -e 'install Perl::Critic' ## perl::critic satisfies a load of deps unless MCPAN is configured incorrectly perl -MCPAN -e 'install Test::Perl::Critic' #perl -MCPAN -e 'install Archive::Tar' #perl -MCPAN -e 'install Archive::Zip' #perl -MCPAN -e 'install Carp' perl -MCPAN -e 'install Config::Simple' #perl -MCPAN -e 'install Cwd' #perl -MCPAN -e 'install Data::Dumper' perl -MCPAN -e 'install DateTime' perl -MCPAN -e 'install DateTime::Format::Parse' perl -MCPAN -e 'install Encode' perl -MCPAN -e 'install File::Copy::Recursive' #perl -MCPAN -e 'install File::Find' perl -MCPAN -e 'install File::Find::Read' perl -MCPAN -e 'install File::Find::Rule' #perl -MCPAN -e 'install File::Path' perl -MCPAN -e 'install File::pushd' perl -MCPAN -e 'install HTML::FormatText' perl -MCPAN -e 'install HTML::TreeBuilder' perl -MCPAN -e 'install I18N::LangTags::List' perl -MCPAN -e 'install Bundle::Compress::Zlib' # install PerlMagick wget http://www.slackermedia.info/downloads/PerlMagick.tar.gz MDCHECK=$(md5sum PerlMagick.tar.gz | cut -f1 -d " ") if [ "X$MDCHECK" != "Xacca39f6bdc3b43b7ecf64dcccac99bb" ] then echo "MD5sum check failed. Aborting." && exit else tar -xf PerlMagick.tar.gz; cd PerlMagick #wget http://search.cpan.org/CPAN/authors/id/J/JC/JCRISTY/PerlMagick-6.67.tar.gz #wget http://ftp.mirror.8086.net/pub/sites/CPAN/authors/John_Cristy/PerlMagick-6.67.tar.gz wget http://ftp.mirror.8086.net/sites/CPAN/authors/John_Cristy/PerlMagick-6.77.tar.gz sed -i 's/VERSION=${VERSION:-6.67}/VERSION=${VERSION:-6.77}/' PerlMagick.SlackBuild sed -i 's/VERSION="6.67"/VERSION="6.77"/' PerlMagick.info sed -i 's/search.cpan.org\/CPAN\/authors\/id\/J\/JC\/JCRISTY\/PerlMagick-6.67.tar.gz/ftp.mirror.8086.net\/sites\/CPAN\/authors\/John_Cristy\/PerlMagick-6.77.tar.gz/' PerlMagick.info sed -i 's/"c786005a73db46ea056082811b9fed3d"/"fa0f66fa0cabbd1b196254f94dec8e99"/' PerlMagick.info ./PerlMagick.SlackBuild installpkg /tmp/PerlMagick*SBo.tgz cd $CWD fi # more modules perl -MCPAN -e 'install Image::Size' perl -MCPAN -e 'install Locale::Maketext::Gettext' perl -MCPAN -e 'install Locale::Language' perl -MCPAN -e 'install Locale::PO' # these modules are needed for slackware current perl -MCPAN -e 'install File::Inplace' perl -MCPAN -e 'install File::HomeDir' # steal Makefile::Parser #wget http://download.fedora.redhat.com/pub/fedora/linux/releases/14/Everything/x86_64/os/Packages/perl-Makefile-Parser-0.211-3.fc14.noarch.rpm wget http://dl.fedoraproject.org/pub/fedora/linux/releases/18/Everything/x86_64/os/Packages/p/perl-Makefile-Parser-0.211-9.fc18.noarch.rpm MDCHECK=$(md5sum perl-Makefile-Parser-0.211-9.fc18.noarch.rpm | cut -f1 -d " ") if [ "X$MDCHECK" != "X2929f55f60d5ebc9b328c44bd2901941" ] then echo "MD5sum check failed. Aborting." && exit else rpm2tgz perl-Makefile-Parser-0.211-9.fc18.noarch.rpm installpkg perl-Makefile-Parser-0.211-9.fc18.noarch.tgz # note to self.. we have to move Makefile later fi perl -MCPAN -e 'install Syntax::Highlight::Engine::Kate' # perl -MCPAN -e 'install Term::ANSIColor' # perl -MCPAN -e 'install Text::Wrap' # perl -MCPAN -e 'install Test::Pod' perl -MCPAN -e 'install XML::LibXML' perl -MCPAN -e 'install XML::LibXSLT' # perl -MCPAN -e 'install XML::Simple' perl -MCPAN -e 'install XML::TreeBuilder' yes | perl -MCPAN -e 'install Template::Plugins' perl -MCPAN -e 'install DBD::SQLite' perl -MCPAN -e 'install DateTime::Format::DateParse' # install Archive::Zip wget http://slackbuilds.org/slackbuilds/13.37/perl/perl-Archive-Zip.tar.gz MDCHECK=$(md5sum perl-Archive-Zip.tar.gz | cut -f1 -d " ") if [ "X$MDCHECK" != "X9ba5b3026c8d2ff05ae9c4e8c7e70385" ] then echo "MD5sum check failed. Aborting." && exit else tar -xf perl-Archive-Zip.tar.gz; cd perl-Archive-Zip wget http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Archive-Zip-1.31_01.tar.gz ./perl-Archive-Zip.SlackBuild installpkg /tmp/perl-Archive-Zip*SBo.tgz cd $CWD fi # I don't mess with peoples fonts, so they can do this on their own as needed echo "Skipping fonts. WARNING: This may affect your ability to properly render certain languages in your documents!" echo "If you need better language support, please install these fonts:" echo " " echo "fonts-bengali - http://download.fedora.redhat.com/pub/fedora/linux/releases/15/Everything/x86_64/os/Packages/lohit-bengali-fonts-2.4.3-7.fc15.noarch.rpm fonts-chinese - package unknown fonts-chinese-zysong - available via Red Hat supplementary CD only due to licensing restrictions on the font fonts-gujarati http://download.fedora.redhat.com/pub/fedora/linux/releases/15/Everything/x86_64/os/Packages/lohit-gujarati-fonts-2.4.5-1.fc15.noarch.rpm fonts-hindi - package unknown fonts-japanese - package unknown fonts-kannada http://download.fedora.redhat.com/pub/fedora/linux/releases/15/Everything/x86_64/os/Packages/lohit-kannada-fonts-2.4.5-8.fc15.noarch.rpm fonts-korean - package unknown fonts-malayalam http://download.fedora.redhat.com/pub/fedora/linux/releases/15/Everything/x86_64/os/Packages/lohit-malayalam-fonts-2.4.4-9.fc15.noarch.rpm fonts-oriya http://download.fedora.redhat.com/pub/fedora/linux/releases/15/Everything/x86_64/os/Packages/lohit-oriya-fonts-2.4.3-9.fc15.noarch.rpm fonts-punjabi http://download.fedora.redhat.com/pub/fedora/linux/releases/15/Everything/x86_64/os/Packages/lohit-punjabi-fonts-2.4.4-4.fc15.noarch.rpm fonts-sinhala - package unknown fonts-tamil http://download.fedora.redhat.com/pub/fedora/linux/releases/15/Everything/x86_64/os/Packages/lohit-tamil-fonts-2.4.5-9.fc15.noarch.rpm fonts-telugu http://download.fedora.redhat.com/pub/fedora/linux/releases/15/Everything/x86_64/os/Packages/lohit-telugu-fonts-2.4.5-9.fc15.noarch.rpm cjkuni-uming-fonts http://download.fedora.redhat.com/pub/fedora/linux/releases/15/Everything/x86_64/os/Packages/cjkuni-uming-fonts-0.2.20080216.1-47.fc15.noarch.rpm ipa-gothic-fonts http://download.fedora.redhat.com/pub/fedora/linux/releases/15/Everything/x86_64/os/Packages/ipa-gothic-fonts-003.02-6.fc15.noarch.rpm ipa-pgothic-fonts http://download.fedora.redhat.com/pub/fedora/linux/releases/15/Everything/x86_64/os/Packages/ipa-pgothic-fonts-003.02-6.fc15.noarch.rpm lklug-fonts http://download.fedora.redhat.com/pub/fedora/linux/releases/15/Everything/x86_64/os/Packages/lklug-fonts-0.6-5.20090803cvs.fc15.noarch.rpm baekmuk-ttf-batang-fonts http://download.fedora.redhat.com/pub/fedora/linux/releases/15/Everything/x86_64/os/Packages/baekmuk-ttf-batang-fonts-2.2-30.fc15.noarch.rpm baekmuk-ttf-hline-fonts http://download.fedora.redhat.com/pub/fedora/linux/releases/15/Everything/x86_64/os/Packages/baekmuk-ttf-hline-fonts-2.2-30.fc15.noarch.rpm baekmuk-ttf-fonts-common http://download.fedora.redhat.com/pub/fedora/linux/releases/15/Everything/x86_64/os/Packages/baekmuk-ttf-fonts-common-2.2-30.fc15.noarch.rpm" echo " " # I will install only the fonts we need wget http://people.salixos.org/djemos/startup-guide/files-fonts/baekmuk-ttf-batang-fonts-2.2-30.fc15.noarch.tgz installpkg baekmuk-ttf-batang-fonts-2.2-30.fc15.noarch.tgz wget http://people.salixos.org/djemos/startup-guide/files-fonts/baekmuk-ttf-fonts-common-2.2-30.fc15.noarch.tgz installpkg baekmuk-ttf-fonts-common-2.2-30.fc15.noarch.tgz wget http://people.salixos.org/djemos/startup-guide/files-fonts/baekmuk-ttf-hline-fonts-2.2-30.fc15.noarch.tgz installpkg baekmuk-ttf-hline-fonts-2.2-30.fc15.noarch.tgz wget http://people.salixos.org/djemos/startup-guide/files-fonts/cjkuni-uming-fonts-0.2.20080216.1-47.fc15.noarch.tgz installpkg cjkuni-uming-fonts-0.2.20080216.1-47.fc15.noarch.tgz #install jdk slapt-get -y -i jdk # set CLASSPATH echo CLASSPATH=$CLASSPATH:/usr/local/fop-1.1/build/fop.jar >> /etc/profile.d/jdk.sh echo export CLASSPATH >> /etc/profile.d/jdk.sh source /etc/profile.d/jdk.sh #install other packages slapt-src -y -i ant-contrib slapt-src -y -i apache-ant slapt-src -y -i xmlgen slapt-src -y -i perl-Probe-Perl slapt-src -y -i perl-IPC-Run3 slapt-src -y -i perl-Test-Script slapt-src -y -i perl-File-Which #install and set fop #wget http://people.salixos.org/djemos/startup-guide/files-fonts/fop-1.0-src.tar.gz wget http://ftp.slackware.com/pub/apache/xmlgraphics/fop/source/fop-1.1-src.tar.gz tar -xvf fop-1.1-src.tar.gz -C /usr/local/ cd /usr/local/fop-1.1 ant ln -sf /usr/local/fop-1.1/fop /usr/bin/fop cd $CWD wget http://people.salixos.org/djemos/startup-guide/files-fonts/offo-hyphenation-fop-stable_v1.2.zip unzip offo-hyphenation-fop-stable_v1.2.zip cp offo-hyphenation-fop-stable/fop-hyph.jar /usr/local/fop-1.0/lib/ rm -rf offo-hyphenation-fop-stable # turn draft mode off so the draft background image doesn't show in every pdf page sed -i 's/.*<\/xsl:param>/no<\/xsl:param>/' /usr/share/publican/xsl/defaults.xsl #If you like download publican-SalixOS from svn #svn co https://salix.svn.sourceforge.net/svnroot/salix/startup-guide/trunk/ #cd trunk #mv publican-SalixOS /usr/share/publican/Common_Content/ #mv /usr/share/publican/Common_Content/publican-SalixOS/el-GR #mv /usr/share/publican/Common_Content/publican-SalixOS/el-GR /usr/share/publican/Common_Content/common # And finally...steal publican wget http://dl.fedoraproject.org/pub/fedora/linux/releases/18/Everything/x86_64/os/Packages/p/publican-2.8-4.fc18.noarch.rpm MDCHECK=$(md5sum publican-2.8-4.fc18.noarch.rpm | cut -f1 -d " ") if [ "X$MDCHECK" != "X93fc625bff73f066ff004adae1104e24" ] then echo "MD5sum check failed. Aborting. Check the downloaded files before continuing manually; it appears they may have been incomplete or insecure." && exit else rpm2tgz publican-2.8-4.fc18.noarch.rpm installpkg publican-2.8-4.fc18.noarch.tgz fi # And finally...steal publican #wget http://download.fedora.redhat.com/pub/fedora/linux/releases/16/Everything/x86_64/os/Packages/publican-2.7-1.fc16.noarch.rpm #MDCHECK=$(md5sum publican-2.7-1.fc16.noarch.rpm | cut -f1 -d " ") #if [ "X$MDCHECK" != "X6f3a16015525e7b501c04f2308cc128a" ] #then echo "MD5sum check failed. Aborting. Check the downloaded files before continuing manually; it appears they may have been incomplete or insecure." && exit #else #rpm2tgz publican-2.7-1.fc16.noarch.rpm #installpkg publican-2.7-1.fc16.noarch.tgz #fi # And finally...steal publican #wget ftp://ftp.univie.ac.at/systems/linux/fedora/updates/16/x86_64/publican-2.8-1.fc16.noarch.rpm #MDCHECK=$(md5sum publican-2.8-1.fc16.noarch.rpm | cut -f1 -d " ") #if [ "X$MDCHECK" != "X6d14fdf415f8cd707c2798f179a0755a" ] #then echo "MD5sum check failed. Aborting. Check the downloaded files before continuing manually; it appears they may have been incomplete or insecure." && exit #else #rpm2tgz publican-2.8-1.fc16.noarch.rpm #installpkg publican-2.8-1.fc16.noarch.tgz #fi #if You like publican-2.8-1.fc15.noarch.rpm # And finally...steal publican #wget ftp://ftp.univie.ac.at/systems/linux/fedora/updates/15/i386/publican-2.8-1.fc15.noarch.rpm #MDCHECK=$(md5sum publican-2.8-1.fc15.noarch.rpm | cut -f1 -d " ") #if [ "X$MDCHECK" != "Xfc0f12b51814f9c664b0a67b9621643f" ] #then echo "MD5sum check failed. Aborting. Check the downloaded files before continuing manually; it appears they may have been incomplete or insecure." && exit #else #rpm2tgz publican-2.8-1.fc15.noarch.rpm #installpkg publican-2.8-1.fc15.noarch.tgz #fi # you're ready.