我试图在CentOS 7下构建最新稳定php(5.6.7)的rpm。
当我尝试构建它时,我收到以下错误:
[bluethundr@repo SPECS]$ rpmbuild -ba php.spec
Processing files: php-5.6.7-1.el7.x86_64
warning: File listed twice: /etc/rc.d/init.d/php-fpm
error: Symlink points to BuildRoot: /usr/bin/phar -> /home/bluethundr/rpmbuild/BUILDROOT/php-5.6.7-1.el7.x86_64/usr/bin/phar.phar
warning: File listed twice: /usr/share/man/man1/php-cgi.1.gz
warning: File listed twice: /usr/share/man/man1/php-config.1.gz
warning: File listed twice: /usr/share/man/man1/php.1.gz
warning: File listed twice: /usr/share/man/man1/phpize.1.gz
RPM build errors:
File listed twice: /etc/rc.d/init.d/php-fpm
Symlink points to BuildRoot: /usr/bin/phar -> /home/bluethundr/rpmbuild/BUILDROOT/php-5.6.7-1.el7.x86_64/usr/bin/phar.phar
File listed twice: /usr/share/man/man1/php-cgi.1.gz
File listed twice: /usr/share/man/man1/php-config.1.gz
File listed twice: /usr/share/man/man1/php.1.gz
File listed twice: /usr/share/man/man1/phpize.1.gz
我不知道我的spec文件中哪里出错了。我无法在其中找到任何重复的条目。因此,我希望能向您展示我的规范文件,您可以指出我的错误。
Name: php
Version: 5.6.7
Release: 1%{?dist}
Summary: PHP is a widely-used general-purpose scripting language.
Group: Development/Languages
License: PHP License v3.01
URL: http://www.php.net
Source0: http://www.php.net/distributions/php-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Obsoletes: php
%description
PHP is a widely-used general-purpose scripting language that is especially
suited for Web development and can be embedded into HTML.
%prep
%setup -q -n %{name}-%{version}
%build
EXTENSION_DIR=%{_libdir}/php/modules; export EXTENSION_DIR
%configure --with-layout=GNU --with-libdir=lib64 --with-enchant \
--enable-fpm --with-gd --enable-intl --enable-mbstring --enable-pcntl \
--enable-soap --enable-sockets --enable-sqlite-utf8 --enable-zip --with-zlib \
--with-curl --with-jpeg-dir --with-png-dir --with-zlib-dir --with-gettext \
--with-mcrypt --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo- mysql=mysqlnd \
--with-pdo-sqlite --with-tidy --with-pear=%{_datadir}/php/pear --disable-debug
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_initrddir}
install -Dp -m0755 sapi/fpm/init.d.php-fpm.in %{buildroot}%{_initrddir}/php-fpm
%{__make} install INSTALL_ROOT="%{buildroot}"
%clean
rm -rf %{buildroot}
%post
%/sbin/chkconfig php-fpm on
%preun
if [ "$1" = 0 ] ; then
/sbin/service php-fpm stop > /dev/null 2>&
/sbin/chkconfig --del php-fpm
fi
exit 0
%postun
if [ "$1" -ge 1 ]; then
/sbin/service php-fpm condrestart > /dev/null 2>&
fi
exit 0
%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_sbindir}/*
%{_includedir}/*
%{_libdir}/*
%{_mandir}/man1/php*
%{_sysconfdir}/*
%{_datadir}/*
%{_initrddir}/*
%exclude /.channels
%exclude /.depdb
%exclude /.depdblock
%exclude /.filemap
%exclude /.lock
%changelog
* Mon Mar 23 2015 Mike Willbanks <mike @_________.com> - 5.3.8-1
- Updated to 5.3.8
* Mon Mar 23 2015 Mike Willbanks </mike><mike @_________.com> - 5.3.5-1
- Initial Package
有人可以就如何做到这一点提出一些建议吗?
感谢!!!