GithubHelp home page GithubHelp logo

rpmize's Introduction

rpmize

Build rpm more easily, inspired by checkinstall.

usage

$ curl http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz | tar zxvf -
$ cd ./hello-2.8
$ /path/to/rpmize

You should complete only build sections(%prep, %build and %install) via $EDITOR.

1 %install
2 %{configure}
3 %{makeinstall}

After you save the above written, a spec file will be shown. The %description section contains a meta data for the next packaging time. You can modify the spec at this timing. However you should not change the meta data and build sections. And you should not put anything into %files section.

Next, rpmiz run the install process and complete the spec file, automatically. You will see %files section is filled via $EDITOR.

Last, rpmiz package a rpm to your %{_rpmdir}.

topic

checkinstallの問題点

  • rootで実行するのが嫌。修正して使ってみたけどやはり限界。
  • doc-pakが作られてしまう(perlのテストに失敗する)description-pakも作られてしまう。ゴミが残る。
  • 結局色々オプションを付けないといけない
  • 古めのautotoolsに対応できてない(気がする)し、そもそもautotoolsじゃない場合に対応できてない(気がする)

TODO

  • prefixをオプション指定できるようにする

  • trap 'rm -rf ゴミファイル ; exit $?' EXIT SIGHUP SIGINT SIGTERM

  • エラー時に止まるようにする&途中で止められるようにする

  • 取れるqueryformatを全て取って埋める

  • ソースディレクトリを汚さないようにする

  • より新しいname,version,releaseである未インストールの $(rpm --eval '%{_rpmdir}')/$(uname --machine)/${name}--.*.rpm が存在すれば、version,release以外をそっちから持ってくる

  • searching rpmforge

    temp=$(mktemp --suffix=.spec)
    curl --location --output ${temp} "https://raw.github.com/repoforge/rpms/master/specs/${package}/${package}.spec"
    summary="$(grep '^Summary:' ${temp} | sed 's,^Summary: *,,')"
    license="$(grep '^License:' ${temp} | sed 's,^License: *,,')"
    description=$(awk '/%description/,/%prep/{print}' "${temp}" | head --lines=-1 | grep --invert-match '^%description')
    rm --force ${temp}
    

rpmize's People

Contributors

robario avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

crsuarez

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.