skesh
skesh

Reputation: 161

How to set a specific destination directory when install a package using installpkg tool of slackware

I am trying to make a package and install it in slackware OS. My package only has a binary executable file. I have created the package with .tgz file using makepkg tool. But when I tried to install the package using the installpkg tool the binary file always extracted to the root directory. So how can I change the destination directory to some other location (like /usr/bin).

What is the use of doinst.sh script in the package.Can I write my own script in it?

Thanks

Upvotes: 1

Views: 736

Answers (1)

bormant
bormant

Reputation: 86

  1. Make temporary directory
  2. Make tree structure of installed files
  3. Make install/ directory with 'slack-desc' file and (optional) 'doinst.sh'
  4. Run makepkg /tmp/package-name-version-arch-build_tag.txz

    # mkdir /tmp/pkg; cd /tmp/pkg
    # mkdir -p usr/bin
    # cp /path/to/your/file usr/bin/
    # chmod a+x usr/bin/file
    # mkdir install
    # cat <<EOF >install/slack-desc
    appname: appname (short description of app)
    appname:
    appname: Long description of appname, wrapped at 71 characters *after* the
    appname: colon following "appname" (and the 'handy ruler' should start at
    appname: that colon and be exactly 71 characters long).
    appname: If there is room, there might be a link to the homepage of the
    appname: application on one of these lines, but it's not necessary.
    appname:
    appname: The maximum number of lines prefixed by "appname:" is 11.
    appname: Lines without any other text should *not* have a space after the :
    appname:
    EOF
    # makepkg /tmp/appname-1.0-x86_64-1_me.txz
    # upgradepkg --install-new /tmp/appname-1.0-x86_64-1_me.txz
    

Upvotes: 1

Related Questions