blob: 4f1395fe15d219f24e11db55738edcf93ef595f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# 软件包名称
Name: Document_Classification
# 软件包版本号
Version: 1.0.0
# 发布号,每次发布时递增,初始可以为 1
Release: 1%{?dist}
# 软件包的简短描述
Summary: This is a sample package for [文件分类]
# 软件包的许可证
License: GPLv3+
# 软件包的主页 URL,如果有,修改为实际的项目网址
URL: https://gitee.com/crayon-xiaoxin-xin/XiaoWu.git
# 定义软件包的原始源代码的获取位置和文件名格式
Source0: %{name}-%{version}.tar.gz
# 生成调试相关的软件包内容
%define debug_package %{nil}
# 软件包的详细描述
%description
This is a more detailed description of my_package.
It includes [文件分类,将一个路径下的文件夹和子文件夹遍历,按照文件类型移动到file、doc、exe、txt,其中file属于其他文件].
# 准备阶段的命令
%prep
echo "开始进入%prep阶段..."
%autosetup
echo "已进入的源文件目录:$(pwd)"
# 构建阶段的命令
%build
cjpm build
# 安装阶段的命令
%install
mkdir -p %{buildroot}/root/Document_Classification/bin
mkdir -p %{buildroot}/root/Document_Classification/conf
cp -r %{_builddir}/%{name}-%{version}/target/release/bin/* %{buildroot}/root/Document_Classification
# 定义软件包中的文件和目录的权限设置
%files
/root/Document_Classification/bin/*
|