diff --git a/fastdfs-6.0.6.tar.gz b/fastdfs-6.0.6.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..08a28b7f20a31a6855eea5a7766a8eaa3153234c Binary files /dev/null and b/fastdfs-6.0.6.tar.gz differ diff --git a/fastdfs.spec b/fastdfs.spec new file mode 100644 index 0000000000000000000000000000000000000000..35d03ad2548fd1d2744dccef070d01f00df867d1 --- /dev/null +++ b/fastdfs.spec @@ -0,0 +1,131 @@ +%define FastDFS fastdfs +%define FDFSServer fastdfs-server +%define FDFSClient libfdfsclient +%define FDFSClientDevel libfdfsclient-devel +%define FDFSTool fastdfs-tool +%define FDFSVersion 6.0.6 +%define CommitVersion %(echo $COMMIT_VERSION) +%define debug_package %{nil} + +Name: %{FastDFS} +Version: %{FDFSVersion} +Release: 1%{?dist} +Summary: FastDFS server and client +License: GPL +Group: Arch/Tech +URL: https://github.com/happyfish100/fastdfs.git +Source: %{name}-%{version}.tar.gz + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +Requires: %__cp %__mv %__chmod %__grep %__mkdir %__install %__id +BuildRequires: libfastcommon-devel >= 1.0.43 + +%description +Fastdfs is an open source lightweight distributed file system. It manages files, +including file storage, file synchronization, file access (file upload, file download), +etc., which solves the problems of mass storage and load balancing. It is especially +suitable for online services with document as carrier, such as photo album website, video website and so on. + +%package -n %{FDFSServer} +Requires: libfastcommon >= 1.0.43 +Summary: fastdfs tracker & storage + +%package -n %{FDFSTool} +Requires: libfastcommon +Summary: fastdfs tools + +%package -n %{FDFSClient} +Requires: libfastcommon +Summary: The client dynamic library of fastdfs + +%package -n %{FDFSClient}-devel +Requires: %{FDFSClient} +Summary: The client header of fastdfs + +%description -n %{FDFSServer} +This package provides tracker & storage of fastdfs + + +%description -n %{FDFSClient} +This package is client dynamic library of fastdfs + + +%description -n %{FDFSClient}-devel +This package is client header of fastdfs client + + +%description -n %{FDFSTool} +This package is tools for fastdfs + + +%prep +%setup -q + +%build +# FIXME: I need to fix the upstream Makefile to use LIBDIR et al. properly and +# send the upstream maintainer a patch. +# add DOCDIR to the configure part +./make.sh + +%install +rm -rf %{buildroot} +DESTDIR=$RPM_BUILD_ROOT ./make.sh install +#make install IGNORE_MAN_GROUP=y DOC_DIR=%{_docdir}/%{name}-%{version} INIT_DIR=%{_initrddir} + +#install -m 0644 sysstat.crond %{buildroot}/%{_sysconfdir}/cron.d/sysstat + +#%find_lang %{name} + +%post -n %{FDFSServer} +/sbin/chkconfig --add fdfs_trackerd +/sbin/chkconfig --add fdfs_storaged + +%preun -n %{FDFSServer} +/sbin/chkconfig --del fdfs_trackerd +/sbin/chkconfig --del fdfs_storaged + +%postun + +%clean +rm -rf %{buildroot} + + +%files -n %{FDFSServer} +%defattr(-,root,root,-) +%{_usr}/bin/fdfs_trackerd +%{_usr}/bin/fdfs_storaged +%{_usr}/bin/restart.sh +%{_usr}/bin/stop.sh +%{_sysconfdir}/init.d/* +%{_sysconfdir}/fdfs/tracker.conf.sample +%{_sysconfdir}/fdfs/storage.conf.sample +%{_sysconfdir}/fdfs/storage_ids.conf.sample + +%files -n %{FDFSClient} +%{_usr}/lib64/libfdfsclient* +%{_usr}/lib/libfdfsclient* +%{_sysconfdir}/fdfs/client.conf.sample + +%files -n %{FDFSClient}-devel +%defattr(-,root,root,-) +%{_usr}/include/fastdfs/* + +%files -n %{FDFSTool} +%{_usr}/bin/fdfs_monitor +%{_usr}/bin/fdfs_test +%{_usr}/bin/fdfs_test1 +%{_usr}/bin/fdfs_crc32 +%{_usr}/bin/fdfs_upload_file +%{_usr}/bin/fdfs_download_file +%{_usr}/bin/fdfs_delete_file +%{_usr}/bin/fdfs_file_info +%{_usr}/bin/fdfs_appender_test +%{_usr}/bin/fdfs_appender_test1 +%{_usr}/bin/fdfs_append_file +%{_usr}/bin/fdfs_upload_appender +%{_usr}/bin/fdfs_regenerate_filename + +%changelog +* Fri Sep 11 2020 xuhanyu +- Package init