Arch: makepkg – ручная установка из PKGBUILD на примере Dropbox

Автор: | 13/01/2017

Про PKGBUILD – читать тут>>>, про makepkgтут>>>.

Пример ручной установки Dropbox.

Клонируем репозиторий:

$ git clone https://aur.archlinux.org/dropbox.git

Проверяем:

$ ls -l dropbox
total 36
-rw-r--r-- 1 setevoy setevoy  2440 Dec 26 11:13 PKGBUILD
-rw-r--r-- 1 setevoy setevoy   270 Dec 26 11:13 dropbox.desktop
-rw-r--r-- 1 setevoy setevoy  4996 Dec 26 11:13 dropbox.png
-rw-r--r-- 1 setevoy setevoy   184 Dec 26 11:13 dropbox.service
-rw-r--r-- 1 setevoy setevoy   232 Dec 26 11:13 [email protected]
-rw-r--r-- 1 setevoy setevoy 11826 Dec 26 11:13 terms.txt

Сам PKGBUILD:

$ head -n 6 PKGBUILD 
# Maintainer: Massimiliano Torromeo <[email protected]>
# Contributor: Tom < tomgparchaur at gmail dot com >
# Contributor: David Manouchehri <[email protected]>

pkgname=dropbox
pkgver=16.4.30
...

Запускаем сборку:

$ cd dropbox && makepkg
==> Making package: dropbox 16.4.30-1 (Mon Dec 26 11:17:30 UTC 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found dropbox.png
  -> Found dropbox.desktop
  -> Found terms.txt
  -> Found dropbox.service
  -> Found [email protected]
  -> Downloading dropbox-lnx.x86_64-16.4.30.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 65.7M  100 65.7M    0     0  3727k      0  0:00:18  0:00:18 --:--:-- 5593k
==> Validating source files with sha256sums...
    dropbox.png ... Passed
    ...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: dropbox 16.4.30-1 (Mon Dec 26 11:18:50 UTC 2016)

В случае неустановленных зависимостей – makepkg выдаст предупрежение, используйте -s (--syncdeps) для их установки.

Проверяем наличие архива:

$ ls -hl dropbox-lnx.x86_64-16.4.30.tar.gz 
-rw-r--r-- 1 setevoy setevoy 66M Dec 26 11:17 dropbox-lnx.x86_64-16.4.30.tar.gz

И устанавливаем его с помощью -i (--install, использует pacman -U):

$ makepkg -i
==> WARNING: A package has already been built, installing existing package...
==> Installing package dropbox with pacman -U...
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) dropbox-16.4.30-1

Total Installed Size:  138.68 MiB

:: Proceed with installation? [Y/n] 
...
:: Processing package changes...
(1/1) installing dropbox                                                                                           [####################################################################] 100%
...

Проверяем:

$ ls -l ~/Dropbox/
total 0

Проверяем:

$ sudo netstat  -tanp | grep dropbox
tcp        0      0 0.0.0.0:17500           0.0.0.0:*               LISTEN      11464/dropbox       
tcp        0      0 10.11.100.43:60412      54.230.228.129:443      ESTABLISHED 11464/dropbox       
tcp        0      0 10.11.100.43:37862      108.160.172.236:443     ESTABLISHED 11464/dropbox       
tcp        0      0 10.11.100.43:37070      108.160.172.225:443     ESTABLISHED 11464/dropbox       
tcp        0      0 10.11.100.43:60410      54.230.228.129:443      ESTABLISHED 11464/dropbox       
tcp        0      0 10.11.100.43:60408      54.230.228.129:443      ESTABLISHED 11464/dropbox       
tcp6       0      0 :::17500                :::*                    LISTEN      11464/dropbox

Синхронизация пошла, готово.