Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
/binary-pkgPublic archive

Tools for creating binary tarballs

License

NotificationsYou must be signed in to change notification settings

sagemath/binary-pkg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To build Sage binaries, just clone this repository and run

git clone https://github.com/sagemath/binary-pkg.gitcd binary-pkgmake bdist-sage-linux     # If you are on Linuxmake bdist-sage-osx       # If you are on OSXls dist/                  # Built binaries will be in this directory

Editsage.yaml if you want to build something else than the currentSagedevelop git branch.

Binary Packaging

This utility helps with creating binaries for distribution. Similar toconda, it builds the source tree in a long directory name which isthen patched at install time. It is written for Sage(http://www.sagemath.org) but equally work for other software.

Usage

Building and packaging of an application is configured with a yamlfile in the repository root. As an example, there is test.yaml andsage.yaml. To create a binary tarball for Sage, for example, all youhave to do is run

make package-sage

This creates a tarball with an addedrelocate-once.py file thatpatches any hard-coded paths. If there are more than one packagingconfigurations (see below), then the first one is used by default. UsethePACKAGE variable to pick another one, for example

make package-sage PACKAGE="OSX DMG image"

In particular, see below for the different Mac packaging possibilities.

Configuration Syntax

Binary packaging information can be specified with a YAMLconfiguration file. As a simplified example, let us look at the testapplication in the test.yaml file. It starts with the name:

name: PackagingTest

which will be the name of the root directory in the binarytarball. Our basic assumption is that your source code lives in a gitrepository, which we specify next:

repository: https://github.com/octol/minimal-gtest-autotoolsbranch: master

Then we have a (bash) build script to build the application

build: |    autoreconf -vfi    ./configure    make

After the build is complete, we need to know the version. Typicallythis can be gotten via a command line switch of the application,though in this case we cheat. In any case, the output of this scriptis the version:

version: |    echo 1.0

Finally, we define how to package the built source tree. There may bemore than one way to package the application, each of which isdistinguished by an internal name.

package:  - name: Full binary tarball    command: |        tar cjf {dist}/test-{version}-{osname}-{arch}.tar.bz2 {path}    files:      - include: '**'    rewrite_path:      - exclude: '**/*.a'

Thefiles section is a list of include/exclude directives, to beread from the bottom up. That is, later directives override earlierones. Therewrite_path section defines a subset of the files thatare to be ignored when rewriting hard-coded paths. In this example,all files are included but paths in static archives are not patched.

Auxiliary Make Targets

Any*.mk file in the root directory will be included in theMakefile for recurring build targets.

Mac Packaging Options

There are three options for packaging Mac. The default will simplycreate a.tar.gz file, which is usually not what one wants on Mac.

To create a Mac disk image file of the normal Sage command line distribution,use this package option:

make package-sage PACKAGE="OSX DMG image"

To create a Mac disk image file of the Mac app bundle with menu items andwhich automatically launches a notebook, use

make package-sage PACKAGE="OSX mac app"

About

Tools for creating binary tarballs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Contributors8


[8]ページ先頭

©2009-2025 Movatter.jp