1 | Summary: IBM OS/2 Developer's Toolkit Version 4.5
|
---|
2 | Name: os2tk45
|
---|
3 | Version: 4.5.2
|
---|
4 | Release: 1%{?dist}
|
---|
5 | Group: System Environment/Libraries
|
---|
6 | License: IBM
|
---|
7 | Vendor: bww bitwise works GmbH
|
---|
8 |
|
---|
9 | %define github_name os2tk45
|
---|
10 | %define github_url https://github.com/bitwiseworks/%{github_name}/archive
|
---|
11 | %define github_rev 660fdb07c929623bd9043c88f2734f08c741e714
|
---|
12 |
|
---|
13 | Source: %{github_name}-%{github_rev}.zip
|
---|
14 |
|
---|
15 | BuildRequires: curl zip
|
---|
16 |
|
---|
17 | # os2-base 0.0.0-12 sets up BOOK and HELP for UNIXROOT in config.sys
|
---|
18 | Requires: os2-base >= 0.0.0-12
|
---|
19 |
|
---|
20 | # Act like a meta-package and install all essential subpackages
|
---|
21 | Requires: %{name}-headers = %{version}
|
---|
22 | Requires: %{name}-books = %{version}
|
---|
23 |
|
---|
24 | %description
|
---|
25 | The IBM OS/2 Developer's Toolkit Version 4.5 provides development support
|
---|
26 | for new features in the "OS/2 Warp Server for e-business" operating system
|
---|
27 | and eComStation.
|
---|
28 |
|
---|
29 | %package readme
|
---|
30 | Summary: IBM OS/2 Developer's Toolkit readme
|
---|
31 | BuildArch: noarch
|
---|
32 |
|
---|
33 | %description readme
|
---|
34 | Provides IBM OS/2 Developer's Toolkit readme and changelog files.
|
---|
35 |
|
---|
36 | %package headers
|
---|
37 | Summary: IBM OS/2 Developer's Toolkit headers
|
---|
38 | Requires: %{name}-readme = %{version}-%{release}
|
---|
39 | BuildArch: noarch
|
---|
40 |
|
---|
41 | %description headers
|
---|
42 | Provides IBM OS/2 Developer's Toolkit header files.
|
---|
43 |
|
---|
44 | %package books
|
---|
45 | Summary: IBM OS/2 Developer's Toolkit books
|
---|
46 | Requires: %{name}-readme = %{version}-%{release}
|
---|
47 | BuildArch: noarch
|
---|
48 |
|
---|
49 | %description books
|
---|
50 | Provides IBM OS/2 Developer's Toolkit book files in INF and HLP formats.
|
---|
51 |
|
---|
52 | %prep
|
---|
53 | %if %(sh -c 'if test -f "%{_sourcedir}/%{github_name}-%{github_rev}.zip" ; then echo 1 ; else echo 0 ; fi')
|
---|
54 | %setup -n "%{github_name}-%{github_rev}" -q
|
---|
55 | %else
|
---|
56 | %setup -n "%{github_name}-%{github_rev}" -Tc
|
---|
57 | rm -f "%{_sourcedir}/%{github_name}-%{github_rev}.zip"
|
---|
58 | curl -sSL "%{github_url}/%{github_rev}.zip" -o "%{_sourcedir}/%{github_name}-%{github_rev}.zip"
|
---|
59 | unzip "%{_sourcedir}/%{github_name}-%{github_rev}.zip" -d ..
|
---|
60 | %endif
|
---|
61 |
|
---|
62 | %build
|
---|
63 |
|
---|
64 | %install
|
---|
65 |
|
---|
66 | mkdir -p %{buildroot}%{_includedir}/os2tk45
|
---|
67 | cp -pR h/* %{buildroot}%{_includedir}/os2tk45/
|
---|
68 | # copy inc directory inside to avoid one more dir under include
|
---|
69 | cp -pR inc %{buildroot}%{_includedir}/os2tk45/
|
---|
70 | # remove SOM stuff, it will go to a separate subpackage one day
|
---|
71 | rm %{buildroot}%{_includedir}/os2tk45/wincfg.*h
|
---|
72 | rm %{buildroot}%{_includedir}/os2tk45/wp*.*h
|
---|
73 |
|
---|
74 | mkdir -p %{buildroot}%{_datadir}/os2/book
|
---|
75 | cp -p book/* %{buildroot}%{_datadir}/os2/book/
|
---|
76 |
|
---|
77 | %files
|
---|
78 |
|
---|
79 | %files readme
|
---|
80 | %doc readme
|
---|
81 | %doc changelog
|
---|
82 |
|
---|
83 | %files headers
|
---|
84 | %{_includedir}/os2tk45
|
---|
85 |
|
---|
86 | %files books
|
---|
87 | %{_datadir}/os2/book/*
|
---|
88 |
|
---|
89 | %post headers
|
---|
90 | if [ "$1" = 1 ] ; then
|
---|
91 | # execute only on first install
|
---|
92 | %cube {ADDSTRING "%UNIXROOT%\usr\include\os2tk45\inc;%UNIXROOT%\usr\include\os2tk45\gl;%UNIXROOT%\usr\include\os2tk45;%UNIXROOT%\usr\include\os2tk45\libc;" IN "SET INCLUDE=" (FIRST IFNEW BEFORE ADDBOTTOM RS(%%)} c:\config.sys > NUL
|
---|
93 | fi
|
---|
94 |
|
---|
95 | %postun headers
|
---|
96 | if [ "$1" = 0 ] ; then
|
---|
97 | # execute only on last uninstall
|
---|
98 | %cube {DELSTRING "%UNIXROOT%\usr\include\os2tk45\inc;%UNIXROOT%\usr\include\os2tk45\gl;%UNIXROOT%\usr\include\os2tk45;%UNIXROOT%\usr\include\os2tk45\libc;" IN "SET INCLUDE=" (FIRST} c:\config.sys > NUL
|
---|
99 | fi
|
---|
100 |
|
---|
101 | %post books
|
---|
102 | if [ "$1" = 1 ] ; then
|
---|
103 | # execute only on first install
|
---|
104 | %cube {REPLINE "SET CPREF=" WITH "SET CPREF=CP1.INF+CP2.INF+CP3.INF" (ADDBOTTOM} c:\config.sys > NUL
|
---|
105 | %cube {REPLINE "SET GPIREF=" WITH "SET GPIREF=GPI1.INF+GPI2.INF+GPI3.INF+GPI4.INF" (ADDBOTTOM} c:\config.sys > NUL
|
---|
106 | %cube {REPLINE "SET MMREF=" WITH "SET MMREF=MMREF1.INF+MMREF2.INF+MMREF3.INF" (ADDBOTTOM} c:\config.sys > NUL
|
---|
107 | %cube {REPLINE "SET PMREF=" WITH "SET PMREF=PM1.INF+PM2.INF+PM3.INF+PM4.INF+PM5.INF" (ADDBOTTOM} c:\config.sys > NUL
|
---|
108 | %cube {REPLINE "SET WPSREF=" WITH "SET WPSREF=WPS1.INF+WPS2.INF+WPS3.INF" (ADDBOTTOM} c:\config.sys > NUL
|
---|
109 | fi
|
---|
110 |
|
---|
111 | %postun books
|
---|
112 | if [ "$1" = 0 ] ; then
|
---|
113 | # execute only on last uninstall
|
---|
114 | %cube {DELLINE "SET CPREF="} c:\config.sys > NUL
|
---|
115 | %cube {DELLINE "SET GPIREF="} c:\config.sys > NUL
|
---|
116 | %cube {DELLINE "SET MMREF="} c:\config.sys > NUL
|
---|
117 | %cube {DELLINE "SET PMREF="} c:\config.sys > NUL
|
---|
118 | %cube {DELLINE "SET WPSREF="} c:\config.sys > NUL
|
---|
119 | fi
|
---|
120 |
|
---|
121 | %changelog
|
---|
122 | * Wed Jan 27 2016 Dmitriy Kuminov <coding@dmik.org> 4.5.2-1
|
---|
123 | - Initial package for Toolkit version 4.5.2.
|
---|
124 | - Remove ancient DOS EOF symbol (0x1A) from headers.
|
---|