# Make Packages

## Make Environment

```
$ sudo apt-get install build-essential dh-make fakeroot devscripts pbuilder cdbs
```

## Preparation of source codes

```
$ git clone https://github.com/mlfcomp/manyo.git
$ cp -r manyo mlf-manyo-0.3.4.210215
$ tar czvf mlf-manyo-0.3.4.210215.tar.gz mlf-manyo-0.3.4.210215
$ cd mlf-manyo-0.3.4.210215
```

Souce code name : mlf-manyo-<upstream-ver>

## Make packages

```
$ source contrib/deb/ubuntu20/deb_environ
$ dh_make -f ../mlf-manyo-0.3.4.210215.tar.gz
$ rm debian/*.ex debian/*.EX

$ dch -v 0.3.4.210215

$ head contrib/deb/ubuntu20/debian/changelog
mlf-manyo (0.3.4.210215-ubu20) UNRELEASED; urgency=medium

  * Second release

 -- Inamura <yinamura@inamura-z820>  Mon, 15 Feb 2021 10:58:57 +0900

mlf-manyo (0.3.4.210122-ubu20) unstable; urgency=medium

  * Initial release

 -- Yasuhiro INAMURA <yasuhiro.inamura@j-parc.jp>  Tue, 26 Jan 2021 21:54:55 +0900

$ cp contrib/deb/ubuntu20/debian/* debian/
$ sudo dpkg-buildpackage -us -uc
$ ls ../*.deb
../mlf-manyo1_0.3.4.210215-ubu20_amd64.deb  ../mlf-manyo-dev_0.3.4.210215-ubu20_amd64.deb
```


## Install

```
$ sudo apt install ./mlf-manyo1_0.3.4.210215-ubu20_amd64.deb
[sudo] password for hogehoge: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'mlf-manyo1' instead of './mlf-manyo1_0.3.4.210215-ubu20_amd64.deb'
The following additional packages will be installed:
  libaec0 libboost-program-options1.71.0 libboost-serialization1.71.0
  libgfortran5 libgsl23 libgslcblas0 libhdf4-0 libhdf5-103 libnexus1 libsz2
Suggested packages:
  gsl-ref-psdoc | gsl-doc-pdf | gsl-doc-info | gsl-ref-html libhdf4-doc
  libhdf4-dev hdf4-tools
The following NEW packages will be installed:
  libaec0 libboost-program-options1.71.0 libboost-serialization1.71.0
  libgfortran5 libgsl23 libgslcblas0 libhdf4-0 libhdf5-103 libnexus1 libsz2
  mlf-manyo1
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,050 kB/5,722 kB of archives.
After this operation, 27.1 MB of additional disk space will be used.
Do you want to continue? [Y/n]

(Logs)

```

## Check

```
$ sudo dpkg -l mlf-manyo1
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name             Version            Architecture Description
+++-================-==================-============-==========================>
ii  mlf-manyo1:amd64 0.3.4.210215-ubu20 amd64        Manyo Library
```