パッケージ作成

(16)
https://eng-entrance.com/linux-package-deb-create
http://pman0214.github.io/blog/debian-package.html

mkdir test
cd test

apt install build-essential
apt install devscripts
apt install cdbs

mkdir testdpkg-sample
cd testdpkg-sample

echo "echo hello" > hello-deb
mkdir debian
cd debian

--1.controlファイルの作成
vim control

Source: testdpkg-sample
Maintainer: Test <test@example.com>
Build-Depends: cdbs, debhelper
Standards-Version: 0.1

Package: testdpkg-sample
Architecture: all
Description: sample

--2.rulesファイルの作成

vim rules

#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk

install/testdpkg-sample::
    install -pd $(DEB_DESTDIR)/usr/bin
    install -pm 755 hello-deb $(DEB_DESTDIR)/usr/bin

※インデントはスペースではなくタブ

--3.changelogファイルの作成


cd ..
dch -i --create

cd debian

vim changelog

1行目を修正
PACKAGE (VERSION) UNRELEASED; urgency=medium

testdpkg-sample (0.1) unstable; urgency=low

5行目を修正
-- root <root@ubu16> Wed, 02 Oct 2019 20:52:29 +0900

-- Test <test@example.com> Wed, 02 Oct 2019 20:52:29 +0900

--4.copyrightファイルの作成

touch copyright

--5.compatファイルの作成

echo 10 > compat


cd ..
debuild -us -uc

cd ..
ls -l

dpkg -l | grep testdpkg
dpkg -i testdpkg-sample_0.1_all.deb
dpkg -l | grep testdpkg


hello-deb

(18)
https://eng-entrance.com/linux-package-deb-create
http://pman0214.github.io/blog/debian-package.html

mkdir test
cd test

apt install build-essential
apt install devscripts
apt install cdbs

mkdir testdpkg-sample
cd testdpkg-sample

echo "echo hello" > hello-deb
mkdir debian
cd debian

--1.controlファイルの作成
vim control

Source: testdpkg-sample
Maintainer: Test <test@example.com>
Build-Depends: cdbs, debhelper
Standards-Version: 0.1

Package: testdpkg-sample
Architecture: all
Description: sample

--2.rulesファイルの作成

vim rules

#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk

install/testdpkg-sample::
    install -pd $(DEB_DESTDIR)/usr/bin
    install -pm 755 hello-deb $(DEB_DESTDIR)/usr/bin

※インデントはスペースではなくタブ

--3.changelogファイルの作成


cd ..
dch -i --create

cd debian

vim changelog

1行目を修正
PACKAGE (VERSION) UNRELEASED; urgency=medium

testdpkg-sample (0.1) unstable; urgency=low

5行目を修正
-- root <root@ubu16> Wed, 02 Oct 2019 20:52:29 +0900

-- Test <test@example.com> Wed, 02 Oct 2019 20:52:29 +0900

--4.copyrightファイルの作成

touch copyright

--5.compatファイルの作成

echo 10 > compat


cd ..
debuild -us -uc

cd ..
ls -l

dpkg -l | grep testdpkg
dpkg -i testdpkg-sample_0.1_all.deb
dpkg -l | grep testdpkg


hello-deb

 

 

(9)

https://eng-entrance.com/linux-package-deb-create
http://pman0214.github.io/blog/debian-package.html

mkdir test
cd test

apt install build-essential
apt install devscripts
apt install cdbs

mkdir testdpkg-sample
cd testdpkg-sample

echo "echo hello" > hello-deb
mkdir debian
cd debian

--1.controlファイルの作成
vim control

Source: testdpkg-sample
Maintainer: Test <test@example.com>
Build-Depends: cdbs, debhelper
Standards-Version: 0.1

Package: testdpkg-sample
Architecture: all
Description: sample

--2.rulesファイルの作成

vim rules

#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk

install/testdpkg-sample::
    install -pd $(DEB_DESTDIR)/usr/bin
    install -pm 755 hello-deb $(DEB_DESTDIR)/usr/bin

※インデントはスペースではなくタブ

--3.changelogファイルの作成


cd ..
dch -i --create

cd debian

vim changelog

1行目を修正
PACKAGE (VERSION) UNRELEASED; urgency=medium

testdpkg-sample (0.1) unstable; urgency=low

5行目を修正
-- root <root@ubu16> Wed, 02 Oct 2019 20:52:29 +0900

-- Test <test@example.com> Wed, 02 Oct 2019 20:52:29 +0900

--4.copyrightファイルの作成

touch copyright

--5.compatファイルの作成

echo 10 > compat


cd ..
debuild -us -uc

cd ..
ls -l

dpkg -l | grep testdpkg
dpkg -i testdpkg-sample_0.1_all.deb
dpkg -l | grep testdpkg


hello-deb

 

(7)

https://qiita.com/Esfahan/items/0aec0c6302fb77a94892

yum -y install rpm-build
yum -y groupinstall 'Development tools'

cd /usr/local/src
curl -O https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.8.1.linux-amd64.tar.gz

mkdir /root/go

vim .bash_profile

export GOPATH=/root/go
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:/usr/local/go/bin

. .bash_profile


mkdir -p /root/go/src/hello

vim /root/go/src/hello/hello.go

package main

import "fmt"

func main() {
fmt.Printf("hello, world\n")
}

cd /root/go/src/hello
go build
./hello

yum -y install rpmdevtools yum-utils

cd
rpmdev-setuptree

cd /root/rpmbuild/
ls -l

cd /root/go/src/hello

tar czvf hello-1.0.tar.gz hello

cp hello-1.0.tar.gz /root/rpmbuild/SOURCES


vim /root/rpmbuild/SPECS/hello.spec

%define name hello
%define version 1.0
%define unmangled_version 1.0
%define release 1
%define _binaries_in_noarch_packages_terminate_build 0

Summary: sample hello world program
Name: %{name}
Version: %{version}
Release: %{release}
License: MIT
Source0: %{name}-%{unmangled_version}.tar.gz
Group: Applications/File
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
BuildArch: noarch

%define INSTALLDIR %{buildroot}/usr/local/bin

%description
This is a sample program to learn how to make a rpm package.

%prep
rm -rf ${RPM_BUILD_ROOT}

%build

%install
rm -rf %{INSTALLDIR}
mkdir -p %{INSTALLDIR}
tar -C %{INSTALLDIR} -xzf /root/rpmbuild/SOURCES/%{name}-%{unmangled_version}.tar.gz

%clean
rm -rf %{buildroot}

%files
/usr/local/bin
%defattr(-,root,root)

 


rpmbuild -bb /root/rpmbuild/SPECS/hello.spec
ls -l /root/rpmbuild/RPMS/noarch/hello-1.0-1.noarch.rpm

rpm -qa | grep hello
rpm -ivh /root/rpmbuild/RPMS/noarch/hello-1.0-1.noarch.rpm
rpm -qa | grep hello

hello

(2012R2)

--MSIインストーラ
https://www.osadasoft.com/visual-studio-2017%E3%81%A7%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%A9%E4%BD%9C%E6%88%90/
https://apicodes.hatenablog.com/entry/vs2019-installer