Ticket #3927: mc.spec

File mc.spec, 4.6 KB (added by jax, 6 years ago)

RPM spec file IBM i PASE environment build of MC

Line 
1%undefine _disable_source_fetch
2
3Name: mc
4Version: 4.8.20
5Release: 3
6License: GNU General Public License, Version 3
7Summary: Midnight Commander
8Url: https://midnight-commander.org/
9
10Source0: https://github.com/MidnightCommander/mc/archive/%{version}.tar.gz
11Patch0: mc_configure.ac.patch
12Patch1: mc_common.c.patch
13
14BuildRequires: boost
15BuildRequires: libxml2-devel
16BuildRequires: libxml2-2
17BuildRequires: libxml2-tools
18BuildRequires: bison
19BuildRequires: pcre-devel
20BuildRequires: pkg-config
21BuildRequires: unixODBC-devel
22BuildRequires: curl-devel
23BuildRequires: openssl-devel < 1.1.0
24BuildRequires: libxslt-devel
25BuildRequires: autoconf
26BuildRequires: automake
27BuildRequires: m4-gnu
28BuildRequires: gettext-tools
29BuildRequires: gettext-runtime
30BuildRequires: libtool
31BuildRequires: libutil-devel
32BuildRequires: glib2-devel
33BuildRequires: slang-devel
34BuildRequires: /QOpenSys/pkgs/bin/sed
35BuildRequires: /QOpenSys/pkgs/bin/perl
36
37%description
38GNU Midnight Commander is a visual file manager, licensed under GNU General Public License and therefore qualifies as Free Software. It's a feature rich full-screen text mode application that allows you to copy, move and delete files and whole directory trees, search for files and run commands in the subshell. Internal viewer and editor are included.
39
40%prep
41%setup
42echo about to apply patches
43%patch0 -p1
44%patch1 -p1
45echo about to hack configure.ac with sed
46/QOpenSys/pkgs/bin/sed -i 's|\/usr\/bin\/python|\/QOpenSys\/pkgs\/bin\/python2|g' configure.ac
47/QOpenSys/pkgs/bin/sed -i 's|\/usr\/bin\/ruby|\/QOpenSys\/pkgs\/bin\/ruby|g' configure.ac
48/QOpenSys/pkgs/bin/sed -i 's|\/usr\/bin\/perl|\/QOpenSys\/pkgs\/bin\/perl|g' configure.ac
49
50%build
51
52./autogen.sh
53
54%configure    \
55    LDFLAGS="-lpthread -Wl,-bbigtoc -Wl,-brtl -Wl,-lpthread,-lutil -Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib:/usr/lib" \
56    CPPFLAGS="$CPPFLAGS -I%{_includedir} -Wl,-lpthread -Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib:/usr/lib -DHAVE_CLOCK_GETTIME"  \
57    CFLAGS="$CFLAGS -I%{_includedir} -Wl,-lpthread -Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib:/usr/lib -DHAVE_CLOCK_GETTIME" \
58    --build=powerpc64-ibm-os400  \
59    --host=powerpc64-ibm-os400  \
60    --with-ncurses-libs=/QOpenSys/pkgs/lib \
61    --enable-shared=yes \
62    #end
63
64ls -l 
65%make_build -j1
66
67
68%install
69
70%make_install INSTALL_ROOT=$RPM_BUILD_ROOT
71
72%files
73%defattr(-, qsys, *none)
74%{_bindir}/mc*
75%{_libexecdir}/mc
76%{_sysconfdir}/mc
77%{_datadir}/mc
78%{_mandir}/man1/mc*
79%{_mandir}/es/man1/mc.1
80%{_mandir}/hu/man1/mc.1
81%{_mandir}/it/man1/mc.1
82%{_mandir}/pl/man1/mc.1
83%{_mandir}/ru/man1/mc.1
84%{_mandir}/sr/man1/mc.1
85%{_datadir}/locale/az/LC_MESSAGES/mc.mo
86%{_datadir}/locale/be/LC_MESSAGES/mc.mo
87%{_datadir}/locale/bg/LC_MESSAGES/mc.mo
88%{_datadir}/locale/ca/LC_MESSAGES/mc.mo
89%{_datadir}/locale/cs/LC_MESSAGES/mc.mo
90%{_datadir}/locale/da/LC_MESSAGES/mc.mo
91%{_datadir}/locale/de/LC_MESSAGES/mc.mo
92%{_datadir}/locale/de_CH/LC_MESSAGES/mc.mo
93%{_datadir}/locale/el/LC_MESSAGES/mc.mo
94%{_datadir}/locale/en_GB/LC_MESSAGES/mc.mo
95%{_datadir}/locale/eo/LC_MESSAGES/mc.mo
96%{_datadir}/locale/es/LC_MESSAGES/mc.mo
97%{_datadir}/locale/et/LC_MESSAGES/mc.mo
98%{_datadir}/locale/eu/LC_MESSAGES/mc.mo
99%{_datadir}/locale/fa/LC_MESSAGES/mc.mo
100%{_datadir}/locale/fi/LC_MESSAGES/mc.mo
101%{_datadir}/locale/fr/LC_MESSAGES/mc.mo
102%{_datadir}/locale/fr_CA/LC_MESSAGES/mc.mo
103%{_datadir}/locale/gl/LC_MESSAGES/mc.mo
104%{_datadir}/locale/hr/LC_MESSAGES/mc.mo
105%{_datadir}/locale/hu/LC_MESSAGES/mc.mo
106%{_datadir}/locale/ia/LC_MESSAGES/mc.mo
107%{_datadir}/locale/id/LC_MESSAGES/mc.mo
108%{_datadir}/locale/it/LC_MESSAGES/mc.mo
109%{_datadir}/locale/ja/LC_MESSAGES/mc.mo
110%{_datadir}/locale/ka/LC_MESSAGES/mc.mo
111%{_datadir}/locale/kk/LC_MESSAGES/mc.mo
112%{_datadir}/locale/ko/LC_MESSAGES/mc.mo
113%{_datadir}/locale/lt/LC_MESSAGES/mc.mo
114%{_datadir}/locale/lv/LC_MESSAGES/mc.mo
115%{_datadir}/locale/mn/LC_MESSAGES/mc.mo
116%{_datadir}/locale/nb/LC_MESSAGES/mc.mo
117%{_datadir}/locale/nl/LC_MESSAGES/mc.mo
118%{_datadir}/locale/pl/LC_MESSAGES/mc.mo
119%{_datadir}/locale/pt/LC_MESSAGES/mc.mo
120%{_datadir}/locale/pt_BR/LC_MESSAGES/mc.mo
121%{_datadir}/locale/ro/LC_MESSAGES/mc.mo
122%{_datadir}/locale/ru/LC_MESSAGES/mc.mo
123%{_datadir}/locale/sk/LC_MESSAGES/mc.mo
124%{_datadir}/locale/sl/LC_MESSAGES/mc.mo
125%{_datadir}/locale/sr/LC_MESSAGES/mc.mo
126%{_datadir}/locale/sv/LC_MESSAGES/mc.mo
127%{_datadir}/locale/szl/LC_MESSAGES/mc.mo
128%{_datadir}/locale/ta/LC_MESSAGES/mc.mo
129%{_datadir}/locale/te/LC_MESSAGES/mc.mo
130%{_datadir}/locale/tr/LC_MESSAGES/mc.mo
131%{_datadir}/locale/uk/LC_MESSAGES/mc.mo
132%{_datadir}/locale/vi/LC_MESSAGES/mc.mo
133%{_datadir}/locale/wa/LC_MESSAGES/mc.mo
134%{_datadir}/locale/zh_CN/LC_MESSAGES/mc.mo
135%{_datadir}/locale/zh_TW/LC_MESSAGES/mc.mo
136
137
138%changelog