Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mersinvald/batch_resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
mersinvald committed Apr 26, 2017
2 parents 0edc811 + a04e3a9 commit 0355ae5
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ This page in [Russian](README_RUS.md)

Fast asynchronous DNS resolver

## Installing
### Static binary
Every release binary can be found in the [the list of versions](https://github.com/mersinvald/batch_resolve/tags). Place it to your binary folder and proceed to usage.
## Install
### Distro packages
There are prebuilt *deb* and *rpm* packages for x86_64 you can find within the releases in [the list of versions](https://github.com/mersinvald/batch_resolve/tags)

Arch Linux users can install the package [from AUR](https://aur.archlinux.org/packages/batch_resolve/)

### Static binary
Every release binary can be found in the [the list of versions](https://github.com/mersinvald/batch_resolve/tags). Just place it to one of directories in your PATH (e.g. /usr/bin)

### Install from crates.io
If you have rust toolkit installed, you can install *batch_resolve* with
Expand Down
4 changes: 4 additions & 0 deletions README_RUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
Быстрый асинхронный DNS резолвер

## Установка
### Пакеты
Существуют универсальные deb и rpm пакеты, собранные под архитектуру x86_64, их можно найти в [списке релизов и файлов для загрузки.](https://github.com/mersinvald/batch_resolve/tags)

Пользователи Arch Linux могут установить *batch_resolve* [из AUR](https://aur.archlinux.org/packages/batch_resolve/)
### Статический бинарник
Для каждого релиза выпускается статический исполняемый файл:
[Список релизов и файлов для загрузки](https://github.com/mersinvald/batch_resolve/tags)
Expand Down
42 changes: 42 additions & 0 deletions packaging/package_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash
SHELL=/bin/bash
VERSION=$(grep "version" Cargo.toml | head -n 1 | grep -Eo "[0-9].[0-9].[0-9]")
LICENSE="MIT"
MAINTAINER="Mike Lubinets <[email protected]>"
DESCRIPTION="Fast asynchronous DNS resolver"
URL="https://github.com/mersinvald/batch_resolve"

# Build statuc binary
~/.bin/rust-musl-builder cargo build --release

# Make temp release dir
mkdir -p packaging/temp

# Copy release into temp folder
cp target/x86_64-unknown-linux-musl/release/batch_resolve packaging/temp

cd packaging

fpm -s dir -t deb --version "$VERSION" --description "$DESCRIPTION" --url "$URL" --name "batch_resolve" --maintainer "$MAINTAINER" temp/batch_resolve=/usr/bin/batch_resolve
fpm -s dir -t rpm --version "$VERSION" --description "$DESCRIPTION" --url "$URL" --name "batch_resolve" --maintainer "$MAINTAINER" temp/batch_resolve=/usr/bin/batch_resolve

rm -rf temp/

# Update aur package
git clone ssh://[email protected]/batch_resolve.git || exit 1
cd batch_resolve
pwd
sed -i "s/pkgver=.*/pkgver=$VERSION/g" PKGBUILD

HASH=$(makepkg -g)
sed -i "/md5sums=.*/d" PKGBUILD
echo $HASH >> PKGBUILD

makepkg --printsrcinfo > .SRCINFO

cat PKGBUILD

git add PKGBUILD .SRCINFO && git commit -m "Version $VERSION" && git push

cd ..
rm -rf batch_resolve/

0 comments on commit 0355ae5

Please sign in to comment.