!3 移动脚本文件到share/fastdfs/bin目录
From: @reganhe_xx Reviewed-by: Signed-off-by:
This commit is contained in:
commit
64afba2b13
32
0001-move_scripts_to_data_dir.patch
Normal file
32
0001-move_scripts_to_data_dir.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From 0e4fbdbdbfbaccec47187e39632398ce32399be9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: herengui <herengui@uniontech.com>
|
||||||
|
Date: Fri, 2 Apr 2021 15:02:37 +0800
|
||||||
|
Subject: [PATCH] 修改make.sh中复制scripts的逻辑,脚本文件放置到/usr/share/fastdfs/bin目录中,
|
||||||
|
直接放到/usr/bin目录中,文件名不能自解释脚本功能。
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
---
|
||||||
|
make.sh | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/make.sh b/make.sh
|
||||||
|
index 69bb072..a1c1304 100755
|
||||||
|
--- a/make.sh
|
||||||
|
+++ b/make.sh
|
||||||
|
@@ -156,8 +156,9 @@ cd ..
|
||||||
|
|
||||||
|
if [ "$1" = "install" ]; then
|
||||||
|
cd ..
|
||||||
|
- cp -f restart.sh $TARGET_PREFIX/bin
|
||||||
|
- cp -f stop.sh $TARGET_PREFIX/bin
|
||||||
|
+ SHARE_BIN_DIR=$TARGET_PREFIX/share/fastdfs/bin
|
||||||
|
+ mkdir -p $SHARE_BIN_DIR
|
||||||
|
+ cp -f restart.sh stop.sh $SHARE_BIN_DIR
|
||||||
|
|
||||||
|
if [ "$uname" = "Linux" ]; then
|
||||||
|
if [ "$WITH_LINUX_SERVICE" = "1" ]; then
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
75
fastdfs.spec
75
fastdfs.spec
@ -1,13 +1,13 @@
|
|||||||
Name: fastdfs
|
Name: fastdfs
|
||||||
Version: 6.06
|
Version: 6.06
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: FastDFS server and client
|
Summary: FastDFS server and client
|
||||||
License: GPL3.0
|
License: GPL3.0
|
||||||
Group: Arch/Tech
|
Group: Arch/Tech
|
||||||
URL: https://github.com/happyfish100/fastdfs
|
URL: https://github.com/happyfish100/fastdfs
|
||||||
Source: https://github.com/happyfish100/fastdfs/archive/V%{version}.tar.gz
|
Source: https://github.com/happyfish100/fastdfs/archive/V%{version}.tar.gz
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
Patch0: 0001-move_scripts_to_data_dir.patch
|
||||||
|
|
||||||
Requires: gcc cmake
|
Requires: gcc cmake
|
||||||
BuildRequires: libfastcommon-devel >= 1.0.43
|
BuildRequires: libfastcommon-devel >= 1.0.43
|
||||||
@ -44,7 +44,7 @@ This package is client header of fastdfs client
|
|||||||
This package is tools for fastdfs
|
This package is tools for fastdfs
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./make.sh
|
./make.sh
|
||||||
@ -59,50 +59,65 @@ rm -f %{buildroot}/etc/fdfs/mime.types.sample
|
|||||||
/sbin/chkconfig --add fdfs_trackerd
|
/sbin/chkconfig --add fdfs_trackerd
|
||||||
/sbin/chkconfig --add fdfs_storaged
|
/sbin/chkconfig --add fdfs_storaged
|
||||||
|
|
||||||
|
create_symbolic_link() {
|
||||||
|
local source_file="%{_datadir}/%{name}/bin/$1"
|
||||||
|
local target_file="%{_bindir}/fdfs_$1"
|
||||||
|
test -f "${source_file}" && ln -sf "${source_file}" "${target_file}"
|
||||||
|
}
|
||||||
|
|
||||||
|
create_symbolic_link "restart.sh"
|
||||||
|
create_symbolic_link "stop.sh"
|
||||||
|
|
||||||
%preun -n fastdfs-server
|
%preun -n fastdfs-server
|
||||||
/sbin/chkconfig --del fdfs_trackerd
|
/sbin/chkconfig --del fdfs_trackerd
|
||||||
/sbin/chkconfig --del fdfs_storaged
|
/sbin/chkconfig --del fdfs_storaged
|
||||||
|
|
||||||
%postun
|
%postun -n fastdfs-server
|
||||||
|
find %{_bindir} -maxdepth 1 -type l \
|
||||||
|
-name "fdfs_restart.sh" -delete -o \
|
||||||
|
-name "fdfs_stop.sh" -delete
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
%files -n fastdfs-server
|
%files -n fastdfs-server
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
/usr/bin/fdfs_trackerd
|
%{_bindir}/fdfs_trackerd
|
||||||
/usr/bin/fdfs_storaged
|
%{_bindir}/fdfs_storaged
|
||||||
/usr/bin/restart.sh
|
%{_datadir}/%{name}/bin/restart.sh
|
||||||
/usr/bin/stop.sh
|
%{_datadir}/%{name}/bin/stop.sh
|
||||||
/etc/init.d/*
|
%{_sysconfdir}/init.d/*
|
||||||
/etc/fdfs/tracker.conf.sample
|
%{_sysconfdir}/fdfs/tracker.conf.sample
|
||||||
/etc/fdfs/storage.conf.sample
|
%{_sysconfdir}/fdfs/storage.conf.sample
|
||||||
/etc/fdfs/storage_ids.conf.sample
|
%{_sysconfdir}/fdfs/storage_ids.conf.sample
|
||||||
|
|
||||||
%files -n libfdfsclient
|
%files -n libfdfsclient
|
||||||
/usr/lib64/libfdfsclient*
|
%{_libdir}/libfdfsclient*
|
||||||
/usr/lib/libfdfsclient*
|
%{_usr}/lib/libfdfsclient*
|
||||||
/etc/fdfs/client.conf.sample
|
%{_sysconfdir}/fdfs/client.conf.sample
|
||||||
|
|
||||||
%files -n libfdfsclient-devel
|
%files -n libfdfsclient-devel
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
/usr/include/fastdfs/*
|
%{_includedir}/fastdfs/*
|
||||||
|
|
||||||
%files -n fastdfs-tools
|
%files -n fastdfs-tools
|
||||||
/usr/bin/fdfs_monitor
|
%{_bindir}/fdfs_monitor
|
||||||
/usr/bin/fdfs_test
|
%{_bindir}/fdfs_test
|
||||||
/usr/bin/fdfs_test1
|
%{_bindir}/fdfs_test1
|
||||||
/usr/bin/fdfs_crc32
|
%{_bindir}/fdfs_crc32
|
||||||
/usr/bin/fdfs_upload_file
|
%{_bindir}/fdfs_upload_file
|
||||||
/usr/bin/fdfs_download_file
|
%{_bindir}/fdfs_download_file
|
||||||
/usr/bin/fdfs_delete_file
|
%{_bindir}/fdfs_delete_file
|
||||||
/usr/bin/fdfs_file_info
|
%{_bindir}/fdfs_file_info
|
||||||
/usr/bin/fdfs_appender_test
|
%{_bindir}/fdfs_appender_test
|
||||||
/usr/bin/fdfs_appender_test1
|
%{_bindir}/fdfs_appender_test1
|
||||||
/usr/bin/fdfs_append_file
|
%{_bindir}/fdfs_append_file
|
||||||
/usr/bin/fdfs_upload_appender
|
%{_bindir}/fdfs_upload_appender
|
||||||
/usr/bin/fdfs_regenerate_filename
|
%{_bindir}/fdfs_regenerate_filename
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Sep 11 2020 huyan90325 <huyan90325@talkweb.com.cn> - 1.0.44-1
|
* Fri Apr 02 2021 herengui <herengui@uniontech.com> - 6.06-2
|
||||||
|
- Rearrange the files list
|
||||||
|
|
||||||
|
* Fri Sep 11 2020 huyan90325 <huyan90325@talkweb.com.cn> - 6.06-1
|
||||||
- Fastdfs package init
|
- Fastdfs package init
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user