商务合作加Q:411239339

Making RPM packet for Libmcrypt on CentOS 7 X86_64

浏览:531次阅读
2 条评论

共计 2335 个字符,预计需要花费 6 分钟才能阅读完成。

1. Pre enviroement

First ,we have to install some necessary tools--rpmdevtools ,just type command as root user:

yum install -y rpmdevtools

2. Setup your directorys

It's so easy to complete that,follow me:

rpmdev-setuptree

You'll find some directorys in /root

/root/rpmbuild/
├── BUILD
├── BUILDROOT
├── RPMS
├── SOURCES
├── SPECS
└── SRPMS

3. Production

Get the source code from link
http://sourceforge.net/projects/mcrypt/files/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz

Then copy it to /root/rpmbuild/SOURCES and create a spec file libmcrypt-2.5.8.spec

Summary: libmcrypt is a data encryption library.
Name: libmcrypt
Version: 2.5.8
Release: 1
License: LGPL
Source: ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/%{name}-%{version}.tar.gz
Vendor: Nikos Mavroyanopoulos <nmav@gnutls.org>
Group: System Environment/Libraries
Packager: Germano Rizzo <mano@pluto.linux.it>
Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildArch: x86_64
Prefix: /usr

%description
libmcrypt is a data encryption library. The library is thread safe
and provides encryption and decryption functions. This version of the
library supports many encryption algorithms and encryption modes. Some
algorithms which are supported:
SERPENT, RIJNDAEL, 3DES, GOST, SAFER+, CAST-256, RC2, XTEA, 3WAY,
TWOFISH, BLOWFISH, ARCFOUR, WAKE and more.

%package devel
Summary: Development files of the libmcrypt data encryption library.
Group: Development/Libraries
Requires: libmcrypt = %{version}

%description devel
Header file and static libraries of libmcrypt data encryption library.

%prep
%setup

%build
./configure --prefix=%{prefix} --libdir=/usr/lib64

make

%install
rm -rf $RPM_BUILD_ROOT

make DESTDIR=$RPM_BUILD_ROOT install

%clean
rm -rf ${RPM_BUILD_ROOT}

%post
ldconfig

%postun
ldconfig

%files
#%defattr(-, root, root, 0755)
%{_libdir}/libmcrypt.so
%{_libdir}/libmcrypt.so*

%files devel
#%defattr(-, root, root, 0755)
%doc doc/README* doc/example.c AUTHORS ChangeLog KNOWN-BUGS NEWS
%doc THANKS README TODO
%{_libdir}/libmcrypt.la
%{_includedir}/mcrypt.h
%{prefix}/man/man3/mcrypt.*
%{_bindir}/libmcrypt-config
%{_datadir}/aclocal/libmcrypt.m4

%changelog</pre>

The most critical moment coming,just one command,what?can't believe?I'll show you:

rpmbuild -bb /root/rpmbuild/SPECS/libmcrypt-2.5.8.spec

Everything is done! All RPM files are in /root/rpmbuild/RPMS

Let's try to install it.

rpm -ivh /root/rpmbuild/RPMS/x86_64/libmcrypt-2.5.8-1.x86_64.rpm  
rpm -ivh /root/rpmbuild/RPMS/x86_64/libmcrypt-devel-2.5.7-1.x86_64.rpm
正文完
扫码赞助
post-qrcode
 0
果子
版权声明:本站原创文章,由 果子 于2016-01-13发表,共计2335字。
转载说明:除特殊说明外本站文章皆由果较瘦原创发布,转载请注明出处。
评论(2 条评论)
2016-01-14 12:13:11 回复

不是的,视频演示是讲自动安装CentOS 系统

 Windows  Chrome  中国湖南省长沙市电信
2016-01-13 23:25:52 回复

这就是视频演示的那个?

 Windows  Chrome  中国新疆伊犁移动