1 | # |
---|
2 | # Default RPM header. |
---|
3 | # |
---|
4 | # START_RPM_STD_HEADER: |
---|
5 | |
---|
6 | |
---|
7 | # |
---|
8 | # RPM properties |
---|
9 | # |
---|
10 | %define _this_product UAM Text Tools |
---|
11 | %define _this_summary Some tools for text processing |
---|
12 | %define _this_name utt |
---|
13 | %define _this_version %(cat ../common/version.def) |
---|
14 | %define _this_release %(cat ../common/release.def) |
---|
15 | %define _this_copyright Adam Mickiewicz University, Poland |
---|
16 | |
---|
17 | # |
---|
18 | # We need some paths |
---|
19 | # |
---|
20 | # Directory with utt binaries |
---|
21 | %define _UTT_DIST_DIR %(pwd) |
---|
22 | #Root directory in which utt will be installed |
---|
23 | %define _UTT_DIR /usr/local/%_this_name |
---|
24 | #Directory for rpm |
---|
25 | %define _RPM_ROOT %_UTT_DIST_DIR/../rpm_root |
---|
26 | |
---|
27 | # |
---|
28 | # Default RPM header. |
---|
29 | # |
---|
30 | # END_RPM_STD_HEADER: |
---|
31 | # -------------------------------------------------------------------- |
---|
32 | |
---|
33 | Summary: %_this_summary |
---|
34 | Name: %_this_name |
---|
35 | Version: %_this_version |
---|
36 | Release: %_this_release |
---|
37 | #Copyright: %_this_copyright |
---|
38 | License: GPL |
---|
39 | Group: Development/Tools |
---|
40 | URL: http://utt.amu.edu.pl |
---|
41 | Vendor: Adam Mickiewicz University |
---|
42 | BuildRoot: %_RPM_ROOT |
---|
43 | #BuildArch: i586 |
---|
44 | # requirements for utt application |
---|
45 | #AutoReq: no |
---|
46 | #AutoReqProv: no |
---|
47 | |
---|
48 | #Requires: glibc >= 2.1.3 |
---|
49 | #Requires: libgcc1 >= 3.0 |
---|
50 | #Requires: libgcc >= 3.0 |
---|
51 | #Requires: libstdc++6 >= 3.4.1 |
---|
52 | #Requires: libstdc++ >= 3.4.1 |
---|
53 | |
---|
54 | %description |
---|
55 | %(cat ../common/description.def) |
---|
56 | |
---|
57 | %description -l pl |
---|
58 | %(cat ../common/description.pl.def) |
---|
59 | |
---|
60 | |
---|
61 | # ------------------------------------------------------------- |
---|
62 | # preparing sources for compilation |
---|
63 | %prep |
---|
64 | |
---|
65 | # source compilation |
---|
66 | %build |
---|
67 | |
---|
68 | # rpm building |
---|
69 | %install |
---|
70 | %__mkdir_p $RPM_BUILD_ROOT%_UTT_DIR |
---|
71 | cp -fr %_UTT_DIST_DIR/* $RPM_BUILD_ROOT%_UTT_DIR/ |
---|
72 | |
---|
73 | |
---|
74 | # cleaning after rpm build |
---|
75 | %clean |
---|
76 | rm -rf $RPM_BUILD_ROOT |
---|
77 | |
---|
78 | # ------------------------------------------------------------- |
---|
79 | #before installation |
---|
80 | %pre |
---|
81 | |
---|
82 | |
---|
83 | #after installation |
---|
84 | %post |
---|
85 | # we need to create utt.conf file |
---|
86 | %_UTT_DIR/create_utt_config.pl |
---|
87 | rm -f %_UTT_DIR/create_utt_config.pl |
---|
88 | # we need to create links in /usr/local/bin |
---|
89 | find %_UTT_DIR/bin/ -type f -exec ln -f {} /usr/local/bin \; |
---|
90 | |
---|
91 | |
---|
92 | #before uninstallation |
---|
93 | %preun |
---|
94 | # we delete links from /usr/local/bin |
---|
95 | for fn in `find %_UTT_DIR/bin/ -type f -exec basename {} \;`; do rm -f /usr/local/bin/$fn; done |
---|
96 | |
---|
97 | |
---|
98 | #after uninstallation |
---|
99 | %postun |
---|
100 | # we remove all extra files |
---|
101 | rm -fr %_UTT_DIR |
---|
102 | |
---|
103 | # ------------------------------------------------------------- |
---|
104 | %files |
---|
105 | %defattr(-,root,root) |
---|
106 | /* |
---|