# ruby-truthy/cfg - "Build" settings for package #--------------------------------------------------------------------- [technotes] 1. The source tarball used by this package was created based on "git" upstream sources. The following command was used: ocgitfetch --run ruby-truthy \ https://github.com/ymendel/truthy.git #--------------------------------------------------------------------- 2. The source tree is a Ruby gem package that doesn't come with "Gem- file" or "gemspec" files. This "cfg" file goes through extra steps so that the package can be built using the usual "gem"-build procedure regardless. #--------------------------------------------------------------------- [buildtimes] #--------------------------------------------------------------------- [settings] configure = none license = tbd licprefix = $PRODTREE/ruby30 proddir = none tmpsize = 1M #--------------------------------------------------------------------- [depends] rake rake-compiler ruby30:strict #--------------------------------------------------------------------- [build] # *** WARNING *** The directory specified by GEMTEMPDIR will be delet- # ed. GEMNAME=truthy GEMTEMPDIR=/ram/foobar GITREPODIR=gitrepo GITFULLPATH=$GEMTEMPDIR/$GITREPODIR/$GEMNAME VERSION_FILE=/tmp/ruby-truthy-version.txt echo "VERSION = '1.0.0'" > $VERSION_FILE #--------------------------------------------------------------------- rm -fr $GEMTEMPDIR mkdir -p $GEMTEMPDIR/$GITREPODIR cp -a `pwd` $GITFULLPATH cd $GEMTEMPDIR VERSION=`grep '^.*VERSION *= *' $VERSION_FILE | \ sed "s@^.*VERSION *= *'\(.*\)'.*@\1@"` if [ "@$VERSION" == "@" ]; then echo Error: VERSION extract code needs work exit 1 fi cat > Gemfile << END gem '$GEMNAME', '$VERSION', git: '$GITFULLPATH' END rm -fr Gemfile.lock ; bundle package bundle gem $GEMNAME cd $GEMNAME tar zcf temp.tgz `find . -name version.rb` rm -fr lib && cp -a $GITFULLPATH/lib . tar zxf temp.tgz rm temp.tgz echo gemspec > Gemfile cp -p $PKGDIR_SPECIAL/*.gemspec . sed -e "s@META_VERSION@$VERSION@" -i *.gemspec git add -A #--------------------------------------------------------------------- for gem in not-needed do sed -e "/add_dependency.*['\"<]$gem['\">]/d" \ -e "/add_development_dependency.*['\"<]$gem['\">]/d" \ -e "/add_runtime_dependency.*['\"<]$gem['\">]/d" \ -i *.gemspec done #--------------------------------------------------------------------- echo gemspec > Gemfile rm -fr Gemfile.lock rm -fr Gemfile.lock ; bundle package gem build *.gemspec || true; gem build *.gemspec gem-install-local *.gem gem-cache-index #--------------------------------------------------------------------- # Original URLs. These URLs were valid at one point, but may have died # since then. If you download newer versions of tarballs [etc.], don't # delete the original versions, as you may not be able to replace # them. [urls] url_debian = tbd url_home = tbd url_lfs = tbd url_tarball = git # See "technotes" in "cfg" file #--------------------------------------------------------------------- [history] 191009 Added package. Started with c53516cac ("git" hash). 220821 Updated to c53516cac