source: spec/trunk/SPECS/os2tk45.spec@ 648

Last change on this file since 648 was 648, checked in by dmik, 10 years ago

spec: os2tk45: Release 4.5.2-1.

File size: 4.2 KB
Line 
1Summary: IBM OS/2 Developer's Toolkit Version 4.5
2Name: os2tk45
3Version: 4.5.2
4Release: 1%{?dist}
5Group: System Environment/Libraries
6License: IBM
7Vendor: 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
13Source: %{github_name}-%{github_rev}.zip
14
15BuildRequires: curl zip
16
17# os2-base 0.0.0-12 sets up BOOK and HELP for UNIXROOT in config.sys
18Requires: os2-base >= 0.0.0-12
19
20# Act like a meta-package and install all essential subpackages
21Requires: %{name}-headers = %{version}
22Requires: %{name}-books = %{version}
23
24%description
25The IBM OS/2 Developer's Toolkit Version 4.5 provides development support
26for new features in the "OS/2 Warp Server for e-business" operating system
27and eComStation.
28
29%package readme
30Summary: IBM OS/2 Developer's Toolkit readme
31BuildArch: noarch
32
33%description readme
34Provides IBM OS/2 Developer's Toolkit readme and changelog files.
35
36%package headers
37Summary: IBM OS/2 Developer's Toolkit headers
38Requires: %{name}-readme = %{version}-%{release}
39BuildArch: noarch
40
41%description headers
42Provides IBM OS/2 Developer's Toolkit header files.
43
44%package books
45Summary: IBM OS/2 Developer's Toolkit books
46Requires: %{name}-readme = %{version}-%{release}
47BuildArch: noarch
48
49%description books
50Provides 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
57rm -f "%{_sourcedir}/%{github_name}-%{github_rev}.zip"
58curl -sSL "%{github_url}/%{github_rev}.zip" -o "%{_sourcedir}/%{github_name}-%{github_rev}.zip"
59unzip "%{_sourcedir}/%{github_name}-%{github_rev}.zip" -d ..
60%endif
61
62%build
63
64%install
65
66mkdir -p %{buildroot}%{_includedir}/os2tk45
67cp -pR h/* %{buildroot}%{_includedir}/os2tk45/
68# copy inc directory inside to avoid one more dir under include
69cp -pR inc %{buildroot}%{_includedir}/os2tk45/
70# remove SOM stuff, it will go to a separate subpackage one day
71rm %{buildroot}%{_includedir}/os2tk45/wincfg.*h
72rm %{buildroot}%{_includedir}/os2tk45/wp*.*h
73
74mkdir -p %{buildroot}%{_datadir}/os2/book
75cp -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
90if [ "$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
93fi
94
95%postun headers
96if [ "$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
99fi
100
101%post books
102if [ "$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
109fi
110
111%postun books
112if [ "$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
119fi
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.
Note: See TracBrowser for help on using the repository browser.