summaryrefslogtreecommitdiff
path: root/ACE/rpmbuild/ace-tao.spec
blob: 7168e8acf84c6095b4f09981eb3e376f3e79dc5c (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
# Set the version number here.
%define ACEVER  7.0.11
%define TAOVER  3.0.11

# Conditional build
# Default values are
#                    --with ipv6         (IPv6 support)
#                    --with opt          (Optimized build)
#                    --with zlib         (Zlib compressor)
#                    --with bzip2        (Bzip2 compressor)
#                    --with tao          (TAO)
#                    --without fltk      (No ftlk support)
#                    --without tk        (No tk support)
#                    --without xt        (No xt support)
#                    --without fox       (No fox support)
#                    --without qt        (No qt support)
#                    --without inline    (Code inlining disabled)
#                    --without versioned (Versioned namespace)

#
# Read: If neither macro exists, then add the default definition.
%{!?_with_ipv6: %{!?_without_ipv6: %define _with_ipv6 --with-ipv6}}
%{!?_with_opt: %{!?_without_opt: %define _with_opt --with-opt}}
%{!?_with_zlib: %{!?_without_zlib: %define _with_zlib --with-zlib}}
%{!?_with_bzip2: %{!?_without_bzip2: %define _with_bzip2 --with-bzip2}}
%{!?_with_tao: %{!?_without_tao: %global _with_tao --with-tao}}
%{!?_with_ftlk: %{!?_without_ftlk: %define _without_ftlk --without-ftlk}}
%{!?_with_tk: %{!?_without_tk: %define _without_tk --without-tk}}
%{!?_with_xt: %{!?_without_xt: %define _without_xt --without-xt}}
%{!?_with_fox: %{!?_without_fox: %define _without_fox --without-fox}}
%{!?_with_qt: %{!?_without_qt: %define _without_qt --without-qt}}
%{!?_with_inline: %{!?_without_inline: %define _without_inline --without-inline}}
%{!?_with_versioned: %{!?_without_versioned: %define _without_versioned 0}}
#
# Read: It's an error if both or neither required options exist.
%{?_with_ipv6: %{?_without_ipv6: %{error: both _with_ipv6 and _without_ipv6}}}
%{?_with_opt: %{?_without_opt: %{error: both _with_opt and _without_opt}}}
%{?_with_zlib: %{?_without_zlib: %{error: both _with_zlib and _without_zlib}}}
%{?_with_bzip2: %{?_without_bzip2: %{error: both _with_bzip2 and _without_bzip2}}}
%{?_with_tao: %{?_without_tao: %{error: both _with_tao and _without_tao}}}
%{?_with_fltk: %{?_without_fltk: %{error: both _with_fltk and _without_fltk}}}
%{?_with_tk: %{?_without_tk: %{error: both _with_tk and _without_tk}}}
%{?_with_xt: %{?_without_xt: %{error: both _with_xt and _without_xt}}}
%{?_with_fox: %{?_without_fox: %{error: both _with_fox and _without_fox}}}
%{?_with_qt: %{?_without_qt: %{error: both _with_qt and _without_qt}}}
%{?_with_inline: %{?_without_inline: %{error: both _with_inline and _without_inline}}}
%{?_with_versioned: %{?_without_versioned: %{error: both _with_versioned and _without_versioned}}}

%{!?skip_make:%global skip_make 0}
%{!?make_nosrc:%global make_nosrc 0}

%define have_fox 0

%if %{?_with_opt:0}%{!?_with_opt:1}
%define OPTTAG .O0
%endif

Name:         ace-tao
%if 0%{?_with_tao:1}%{?_without_tao:0}
Summary:      The ADAPTIVE Communication Environment (ACE) and The ACE ORB (TAO)
%else
Summary:      The ADAPTIVE Communication Environment (ACE)
%endif

Version:      %{ACEVER}

%if 0%{?opensuse_bs}
Release:      <CI_CNT>%{?OPTTAG}%{?dist}
%else
Release:      1%{?OPTTAG}%{?dist}
%endif

Group:        Development/Libraries/C and C++
URL:          http://www.dre.vanderbilt.edu/~schmidt/ACE.html
License:      DOC
%if 0%{?_with_tao:1}%{?_without_tao:0}
Source0:      http://download.dre.vanderbilt.edu/previous_versions/ACE+TAO-src-%{ACEVER}.tar.gz
%else
Source0:      http://download.dre.vanderbilt.edu/previous_versions/ACE-src-%{ACEVER}.tar.gz
%endif
Source1:      ace-tao-rpmlintrc
BuildRoot:    %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%define _extension .gz

%if 0%{?fedora} || 0%{?rhel}
BuildRequires: redhat-rpm-config elfutils
%endif

%if !0%{?suse_version}
Requires(post):   /sbin/install-info
Requires(preun):  /sbin/install-info
Requires(postun): /sbin/ldconfig
%else
PreReq:         %install_info_prereq %insserv_prereq  %fillup_prereq
PreReq:         pwdutils
%endif

%if 0%{?mdkversion}
BuildRequires:  sendmail
%endif

BuildRequires:  openssl-devel
BuildRequires:  gcc-c++
BuildRequires:  libstdc++-devel

%if %{?_with_zlib:1}%{!?_with_zlib:0}
BuildRequires:  zlib-devel
%endif

%if %{?_with_bzip2:1}%{!?_with_bzip2:0}
BuildRequires:  bzip2
%endif

BuildRequires:  perl perl(Data::Dumper)

%if %{?_with_fltk:1}%{!?_with_fltk:0}
BuildRequires:  fltk-devel
%define fltk_pac ace-flreactor
%endif

%if %{?_with_tk:1}%{!?_with_tk:0}
BuildRequires:  tcl-devel
BuildRequires:  tk-devel
BuildRequires:  tk
%define tk_pac ace-tkreactor
%define tao_tk_pac tao-tkresource
%endif

%if %{?_with_qt:1}%{!?_with_qt:0}
%define qt_pack ace-qtreactor
%define tao_qt_pac tao-qtresource

# qt3 has a name change in F9
%if 0%{?fedora} > 8
%define qtpacname qt3
%else
%define qtpacname qt
%endif

%if 0%{?suse_version}
%define qtpacname qt3
%endif

BuildRequires:  %{qtpacname}-devel
%endif

%if %{?_with_fox:1}%{!?_with_fox:0}
%if 0%{?suse_version} == 1020
BuildRequires: fox16-devel
%endif
%define fox_pac ace_foxreactor
%endif

%if %{?_with_xt:1}%{!?_with_xt:0}
%define xt_pac ace-xtreactor
%define tao_xt_pac tao-xtresource
%endif

%if %{?_with_fl:1}%{!?_with_fl:0}
%define tao_fl_pac tao-flresource
%endif

%if 0%{?suse_version}
%global ace_packages ace ace-xml ace-gperf ace-kokyu
%global tao_packages tao tao-utils tao tao-cosnaming tao-cosevent tao-cosnotification tao-costrading tao-rtevent tao-cosconcurrency
%global all_ace_packages %{?ace_packages} %{?fltk_pac} %{?tk_pac} %{?qt_pac} %{?fox_pac} %{?xt_pac}
%if 0%{?_with_tao:1}%{?_without_tao:0}
%global all_tao_packages %{?tao_packages} %{?tao_fl_pac} %{?tao_qt_pac} %{?tao_xt_pac} %{?tao_tk_pac}
%endif
%global debug_package_requires %{all_ace_packages} %{?all_tao_packages}
%endif

%if 0%{?make_nosrc}
# Leave out the distro for now
NoSource: 0
%endif

%description -n ace-tao

The ADAPTIVE Communication Environment (ACE) is a freely available,
open-source object-oriented (OO) framework that implements many core
patterns for concurrent communication software. ACE provides a rich
set of reusable C++ wrapper facades and framework components that
perform common communication software tasks across a range of OS
platforms. The communication software tasks provided by ACE include
event demultiplexing and event handler dispatching, signal handling,
service initialization, interprocess communication, shared memory
management, message routing, dynamic (re)configuration of distributed
services, concurrent execution and synchronization.

TAO is a real-time implementation of CORBA built using the framework
components and patterns provided by ACE. TAO contains the network
interface, OS, communication protocol, and CORBA middleware components
and features. TAO is based on the standard OMG CORBA reference model,
with the enhancements designed to overcome the shortcomings of
conventional ORBs for high-performance and real-time applications.

# ---------------- ace ----------------

%package -n     ace
Summary:        The ADAPTIVE Communication Environment (ACE)
Version:        %{ACEVER}
Group:          Development/Libraries/C and C++
Requires:       openssl

%description -n ace

The ADAPTIVE Communication Environment (ACE) is a freely available,
open-source object-oriented (OO) framework that implements many core
patterns for concurrent communication software. ACE provides a rich
set of reusable C++ wrapper facades and framework components that
perform common communication software tasks across a range of OS
platforms. The communication software tasks provided by ACE include
event demultiplexing and event handler dispatching, signal handling,
service initialization, interprocess communication, shared memory
management, message routing, dynamic (re)configuration of distributed
services, concurrent execution and synchronization.

# ---------------- ace-devel ----------------

%package -n     ace-devel
Summary:        Header files and development components for ACE
Version:        %{ACEVER}
Group:          Development/Libraries/C and C++
Requires:       ace = %{ACEVER}
Requires:       openssl-devel
%if !0%{?suse_version}
Provides:       perl(PerlACE::Run_Test) perl(Process) perl(VmsProcess) perl(Win32::Process)
%endif

%description -n ace-devel

This package contains the components needed for developing programs
using ACE.

# ---------------- ace-xml ----------------

%package -n     ace-xml
Summary:        ACE XML Runtime Support
Version:        %{ACEVER}
Group:          Development/Libraries/C and C++
Requires:       ace = %{ACEVER}

%description -n ace-xml

ACE XML Parser interfaces follows the the design of SAX 2.0, which is
a public domain specification for Java.  The major difference between
ACE XML Parser interfaces and SAX is that we added an reference of
ACEXML_Env to every SAX method to accommodate platforms/compilers that
don't support C++ exceptions.  SAX is defined by David Megginson
<david@megginson.com>

# ---------------- ace-gperf ----------------

%package -n     ace-gperf
Summary:        ACE gperf
Version:        %{ACEVER}
Group:          Development/Libraries/C and C++
Requires:       ace = %{ACEVER}

%description -n ace-gperf

ACE gperf utility

# ---------------- ace-xml-devel ----------------

%package -n     ace-xml-devel
Summary:        Header files and development components for ACE XML
Version:        %{ACEVER}
Group:          Development/Libraries/C and C++
Requires:       ace-devel = %{ACEVER}
Requires:       ace-xml = %{ACEVER}

%description -n ace-xml-devel

This package contains the components needed for developing programs
using ACEXML.

# ---------------- ace-kokyu ----------------

%package -n     ace-kokyu
Summary:        Kokyu scheduling framework for ACE
Version:        %{ACEVER}
Group:          Development/Libraries/C and C++
Requires:       ace = %{ACEVER}

%description -n ace-kokyu

Kokyu is a portable middleware scheduling framework designed to
provide flexible scheduling and dispatching services within the
context of higher-level middleware. Kokyu currently provides real-time
scheduling and dispatching services for TAO's real-time Event Service
which mediates supplier-consumer relationships between application
operations. Kokyu also provides a scheduling and dispatching framework
for threads. This is being used by the TAO RTCORBA 2.0 scheduler
implementations.

# ---------------- ace-kokyu-devel ----------------

%package -n     ace-kokyu-devel
Summary:        Header files and development components for the ACE Kokyu scheduler
Version:        %{ACEVER}
Group:          Development/Libraries/C and C++
Requires:       ace-devel = %{ACEVER}
Requires:       ace-kokyu = %{ACEVER}

%description -n ace-kokyu-devel

This package contains the components needed for developing programs
using Kokyu.


# ---------------- ace-foxreactor ----------------

%if %{?_with_fox:1}%{!?_with_fox:0}
%if 0%{?have_fox} == 1
%package -n     ace-foxreactor
Summary:        ACE_FoxReactor for use with the FOX toolkit
Version:        %{ACEVER}
Group:          Development/Libraries/C and C++
Requires:       ace = %{ACEVER}
Requires:       fox16

%description -n ace-foxreactor

A Reactor implementation that uses the FOX toolkit for
event demultiplexing.  This will let us integrate the FOX toolkit with
ACE and/or TAO.
%endif
%endif

# ---------------- ace-foxreactor-devel ----------------

%if %{?_with_fox:1}%{!?_with_fox:0}
%if 0%{?have_fox} == 1
%package -n     ace-foxreactor-devel
Summary:        Header files for development with ACE_FoxReactor
Version:        %{ACEVER}
Group:          Development/Libraries/C and C++
Requires:       ace-devel = %{ACEVER}
Requires:       ace-foxreactor = %{ACEVER}
Requires:       fox16-devel

%description -n ace-foxreactor-devel

This package contains the components needed for developing programs
using the ACE_FoxReactor.
%endif
%endif

# ---------------- ace-flreactor ----------------

%if %{?_with_fl:1}%{!?_with_fl:0}
%package -n     ace-flreactor
Summary:        ACE_FlReactor for use with the Fast-Light toolkit
Version:        %{ACEVER}
Group:          Development/Libraries/C and C++
Requires:       ace = %{ACEVER}
Requires:       fltk

%description -n ace-flreactor

A Reactor implementation that uses the Fast-Light (FL) toolkit for
event demultiplexing.  This will let us integrate the FL toolkit with
ACE and/or TAO.
%endif

# ---------------- ace-flreactor-devel ----------------

%if %{?_with_fl:1}%{!?_with_fl:0}
%package -n     ace-flreactor-devel
Summary:        Header files for development with ACE_FlReactor
Version:        %{ACEVER}
Group:          Development/Libraries/C and C++
Requires:       ace-devel = %{ACEVER}
Requires:       ace-flreactor = %{ACEVER}
Requires:       fltk-devel

%description -n ace-flreactor-devel

This package contains the components needed for developing programs
using the ACE_FlReactor.
%endif

# ---------------- ace-qtreactor ----------------

%if %{?_with_qt:1}%{!?_with_qt:0}
%package -n     ace-qtreactor
Summary:        ACE_QtReactor for use with Qt library
Version:        %{ACEVER}
Group:          Development/Libraries/C and C++
Requires:       ace = %{ACEVER}
Requires:       qt4

%description -n ace-qtreactor

A Reactor implementation that uses the Qt toolkit for event
demultiplexing.  This will let us integrate the Qt toolkit with ACE
and/or TAO.
%endif

# ---------------- ace-qtreactor-devel ----------------

%if %{?_with_qt:1}%{!?_with_qt:0}
%package -n     ace-qtreactor-devel
Summary:        Header files for development with ACE_QtReactor
Version:        %{ACEVER}
Group:          Development/Libraries/C and C++
Requires:       ace-devel = %{ACEVER}
Requires:       ace-qtreactor = %{ACEVER}
Requires:       qt4-devel

%description -n ace-qtreactor-devel

This package contains the components needed for developing programs
using the ACE_QtReactor.
%endif

# ---------------- ace-tkreactor ----------------

%if %{?_with_tk:1}%{!?_with_tk:0}
%package -n     ace-tkreactor
Summary:        ACE_TkReactor for use with Tk toolkit
Version:        %{ACEVER}
Group:          Development/Libraries/C and C++
Requires:       ace = %{ACEVER}
Requires:       tk

%description -n ace-tkreactor

A Reactor implementation that uses the Tk toolkit for event
demultiplexing.  This will let us integrate the Tk toolkit with ACE
and/or TAO.
%endif

# ---------------- ace-tkreactor-devel ----------------

%if %{?_with_tk:1}%{!?_with_tk:0}
%package -n     ace-tkreactor-devel
Summary:        Header files for development with ACE_TkReactor
Version:        %{ACEVER}
Group:          Development/Libraries/C and C++
Requires:       ace-devel = %{ACEVER}
Requires:       ace-tkreactor = %{ACEVER}
Requires:       tk-devel

%description -n ace-tkreactor-devel

This package contains the components needed for developing programs
using the ACE_TkReactor.
%endif

# ---------------- ace-xtreactor ----------------

%if %{?_with_xt:1}%{!?_with_xt:0}
%package -n     ace-xtreactor
Summary:        ACE_XtReactor for use with the X Toolkit
Version:        %{ACEVER}
Group:          Development/Libraries/C and C++
Requires:       ace = %{ACEVER}
# The xorg packaging scheme changed, let autoreq to the job for now.
# Requires: xorg-x11-libs

%description -n ace-xtreactor

A Reactor implementation that uses the X Toolkit for event
demultiplexing.  This will let us integrate the X Toolkit with ACE
and/or TAO.
%endif

# ---------------- ace-xtreactor-devel ----------------

%if %{?_with_xt:1}%{!?_with_xt:0}
%package -n     ace-xtreactor-devel
Summary:        Header files for development with ACE_XtReactor
Version:        %{ACEVER}
Group:          Development/Libraries/C and C++
Requires:       ace-devel = %{ACEVER}
Requires:       ace-xtreactor = %{ACEVER}
# The xorg package naming scheme changed, use specific files for now.
# old -> Requires: xorg-x11-devel
# new -> Requires: libX11-devel
Requires: %{_libdir}/libX11.so
Requires: %{_libdir}/libXt.so

%description -n ace-xtreactor-devel

This package contains the components needed for developing programs
using the ACE_XtReactor.
%endif

# ---------------- MPC ----------------

%package -n   mpc
Summary:      Make Project Creator
Version:      %{ACEVER}
Group:        Development/Tools/Building
%if !0%{?suse_version}
Provides:     perl(Driver) perl(MakeProjectBase) perl(ObjectGenerator) perl(ProjectCreator) perl(WorkspaceCreator) perl(WorkspaceHelper) perl(DependencyWriter) perl(WIXProjectCreator)
%endif

%description -n mpc

The Makefile, Project and Workspace Creator.
Designed by Justin Michel (michel_j@ociweb.com) and Chad Elliott.
Implemented by Chad Elliott (elliott_c@ociweb.com).

A single tool (MPC) can be used to generate tool specific input (i.e.
Makefile, dsp, vcproj, etc). The generator takes platform and building
tool generic files (mpc files) as input which describe basic information
needed to generate a "project" file for various build tools. These tools
include Make, NMake, Visual C++ 6, Visual C++ 7, etc.

# ---------------- tao ----------------
%if 0%{?_with_tao:1}%{?_without_tao:0}

%package -n     tao
Summary:        The ACE ORB (TAO)
Version:        %{TAOVER}
Group:          Development/Libraries/C and C++
Requires:       ace = %{ACEVER}

%description -n tao

TAO is a real-time implementation of CORBA built using the framework
components and patterns provided by ACE. TAO contains the network
interface, OS, communication protocol, and CORBA middleware components
and features. TAO is based on the standard OMG CORBA reference model,
with the enhancements designed to overcome the shortcomings of
conventional ORBs for high-performance and real-time applications.

# ---------------- tao-devel ----------------

%package -n     tao-devel
Summary:        Header files and development components for TAO
Version:        %{TAOVER}
Group:          Development/Libraries/C and C++
Requires:       tao = %{TAOVER}
Requires:       ace-devel = %{ACEVER}
Requires:       ace-gperf = %{ACEVER}

%description -n tao-devel

This package contains the components needed for developing programs
using TAO.

# ---------------- tao-utils ----------------

%package -n     tao-utils
Summary:        TAO naming service and IOR utilities
Version:        %{TAOVER}
Group:          Development/Libraries/C and C++
Requires:       tao = %{TAOVER}

%description -n tao-utils

This package includes programs to query or control a CORBA naming service,
and to dump an IOR.

The following programs are included:
* tao-nslist, to list naming context and object bindings
* tao-nsadd, to create bindings
* tao-nsdel, to remove bindings
* tao-catior, to dump the content of an Interoperable Object Reference

# ---------------- tao-cosnaming ----------------

%package -n     tao-cosnaming
Summary:        The TAO CORBA Naming Service (CosNaming) and Interoperable Naming Service (INS)
Version:        %{TAOVER}
Group:          Development/Libraries/C and C++
Requires:       tao = %{TAOVER}
Requires:       logrotate

%description -n tao-cosnaming

OMG defined CORBA Naming Service to provide a basic service location
mechanism for CORBA systems. CosNaming manages a hierarchy of
name-to-object-reference mappings. Anything, but typically the server
process hosting an object, may bind an object reference with a name in
the Naming Service by providing the name and object
reference. Interested parties (typically clients) can then use the
Naming Service to resolve a name to an object reference.

More recently, CORBA Naming Service was subsumed/extended by the CORBA
Interoperable Naming Service, a.k.a. INS. INS inherits all the
functionality from the original Naming Service specification in
addition to addressing some its shortcomings. In particular, INS
defines a standard way for clients and servers to locate the Naming
Service itself. It also allows the ORB to be administratively
configured for bootstrapping to services not set up with the orb at
install time.

# ---------------- tao-cosevent ----------------

%package -n     tao-cosevent
Summary:        The TAO CORBA CosEvent Service
Version:        %{TAOVER}
Group:          Development/Libraries/C and C++
Requires:       tao = %{TAOVER}
Requires:       logrotate

%description -n tao-cosevent

The CosEvent_Service is a COS compliant Event Service.

The service is registered with the naming service with the name
"CosEventService" . It exposes the <EventChannel> interface which can be
used by suppliers and consumers to send and receive events.

# ---------------- tao-cosnotification ----------------

%package -n     tao-cosnotification
Summary:        The TAO CORBA Notification Service
Version:        %{TAOVER}
Group:          Development/Libraries/C and C++
Requires:       tao = %{TAOVER}
Requires:       logrotate

%description -n tao-cosnotification

The Notify_Service is a COS compliant Notification Service.

The Notify_Service executable starts up a Notification Service factory
and registers it with the Naming Service under the name
"NotifyEventChannelFactory"

# ---------------- tao-costrading ----------------

%package -n     tao-costrading
Summary:        The TAO CORBA Trading Service
Version:        %{TAOVER}
Group:          Development/Libraries/C and C++
Requires:       tao = %{TAOVER}
Requires:       logrotate

%description -n tao-costrading

The Trading_Service is a COS compliant Trading Service.

# ---------------- tao-rtevent ----------------

%package -n     tao-rtevent
Summary:        The TAO Real-time Event Service
Version:        %{TAOVER}
Group:          Development/Libraries/C and C++
Requires:       tao = %{TAOVER}
Requires:       logrotate

%description -n tao-rtevent

The TAO Real-Time Event Service. This is a TAO specific service
implementation

# ---------------- tao-cosconcurrency ----------------

%package -n     tao-cosconcurrency
Summary:        The TAO CORBA Concurrency Service
Version:        %{TAOVER}
Group:          Development/Libraries/C and C++
Requires:       tao = %{TAOVER}
Requires:       logrotate

%description -n tao-cosconcurrency

The CORBA Concurrency Service. One of the standard CORBA services.

# ---------------- tao-flresource ----------------

%if %{?_with_fl:1}%{!?_with_fl:0}
%package -n     tao-flresource
Summary:        FlResource_Factory for creating FlReactor
Version:        %{TAOVER}
Group:          Development/Libraries/C and C++
Requires:       ace-flreactor = %{ACEVER}
Requires:       tao = %{TAOVER}

%description -n tao-flresource

This factory is intended for creating FlReactor for ORB. This factory
can be feed into ORB using TAO_ORB_Core::set_gui_resource_factory
method which is usually done by TAO_FlResource_Loader.
%endif

# ---------------- tao-flresource-devel ----------------

%if %{?_with_fl:1}%{!?_with_fl:0}
%package -n     tao-flresource-devel
Summary:        Header files for development with FlResource_Factory
Version:        %{TAOVER}
Group:          Development/Libraries/C and C++
Requires:       ace-flreactor-devel = %{ACEVER}
Requires:       tao-devel = %{TAOVER}
Requires:       tao-flresource = %{TAOVER}

%description -n tao-flresource-devel

This package contains the components needed for developing programs
using the FlResource_Factory.
%endif

# ---------------- tao-qtresource ----------------

%if %{?_with_qt:1}%{!?_with_qt:0}
%package -n     tao-qtresource
Summary:        QtResource_Factory for creating QtReactor
Version:        %{TAOVER}
Group:          Development/Libraries/C and C++
Requires:       ace-qtreactor = %{ACEVER}
Requires:       tao = %{TAOVER}

%description -n tao-qtresource

This factory is intended for creating QtReactor for ORB. This factory
can be feed into ORB using TAO_ORB_Core::set_gui_resource_factory
method which is usually done by TAO_QtResource_Loader.
%endif

# ---------------- tao-qtresource-devel ----------------

%if %{?_with_qt:1}%{!?_with_qt:0}
%package -n     tao-qtresource-devel
Summary:        Header files for development with QtResource_Factory
Version:        %{TAOVER}
Group:          Development/Libraries/C and C++
Requires:       ace-qtreactor-devel = %{ACEVER}
Requires:       tao-devel = %{TAOVER}
Requires:       tao-qtresource = %{TAOVER}

%description -n tao-qtresource-devel

This package contains the components needed for developing programs
using the QtResource_Factory.
%endif

# ---------------- tao-tkresource ----------------

%if %{?_with_tk:1}%{!?_with_tk:0}
%package -n     tao-tkresource
Summary:        TkResource_Factory for creating TkReactor
Version:        %{TAOVER}
Group:          Development/Libraries/C and C++
Requires:       ace-tkreactor = %{ACEVER}
Requires:       tao = %{TAOVER}

%description -n tao-tkresource

This factory is intended for creating TkReactor for ORB. This factory
can be feed into ORB using TAO_ORB_Core::set_gui_resource_factory
method which is usually done by TAO_TkResource_Loader.
%endif

# ---------------- tao-tkresource-devel ----------------

%if %{?_with_tk:1}%{!?_with_tk:0}
%package -n     tao-tkresource-devel
Summary:        Header files for development with TkResource_Factory
Version:        %{TAOVER}
Group:          Development/Libraries/C and C++
Requires:       ace-tkreactor-devel = %{ACEVER}
Requires:       tao-devel = %{TAOVER}
Requires:       tao-tkresource = %{TAOVER}

%description -n tao-tkresource-devel

This package contains the components needed for developing programs
using the TkResource_Factory.
%endif

# ---------------- tao-xtresource ----------------

%if %{?_with_xt:1}%{!?_with_xt:0}
%package -n     tao-xtresource
Summary:        XtResource_Factory for creating XtReactor
Version:        %{TAOVER}
Group:          Development/Libraries/C and C++
Requires:       ace-xtreactor = %{ACEVER}
Requires:       tao = %{TAOVER}

%description -n tao-xtresource

This factory is intended for creating XtReactor for ORB. This factory
can be feed into ORB using TAO_ORB_Core::set_gui_resource_factory
method which is usually done by TAO_XtResource_Loader.
%endif

# ---------------- tao-xtresource-devel ----------------

%if %{?_with_xt:1}%{!?_with_xt:0}
%package -n     tao-xtresource-devel
Summary:        Header files for development with XtResource_Factory
Version:        %{TAOVER}
Group:          Development/Libraries/C and C++
Requires:       ace-xtreactor-devel = %{ACEVER}
Requires:       tao-devel = %{TAOVER}
Requires:       tao-xtresource = %{TAOVER}

%description -n tao-xtresource-devel

This package contains the components needed for developing programs
using the XtResource_Factory.
%endif

%endif

# ================================================================
# prep
# ================================================================

%prep
%setup -q -n ACE_wrappers

# ================================================================
# build
# ================================================================

%build

export ACE_ROOT=$(pwd)
export MPC_ROOT=$ACE_ROOT/MPC
export LD_LIBRARY_PATH=$ACE_ROOT/lib
%if 0%{?_with_tao:1}%{?_without_tao:0}
export TAO_ROOT=$ACE_ROOT/TAO
%endif

# Dump the g++ versions, in case the g++ version is broken we can
# easily see this in the build log
g++ --version
g++ -dumpversion

%define inline %{nil}

%if %skip_make

cd .. && rm -rf ACE_wrappers && ln -s ACE_wrappers-BUILT ACE_wrappers

%else

cat > $ACE_ROOT/ace/config.h << EOF
EOF

# If ipv6 support is indicated insert some lines into the config.h file
%if %{?_with_ipv6:1}%{!?_with_ipv6:0}
cat >> $ACE_ROOT/ace/config.h << EOF
#define ACE_HAS_IPV6
#define ACE_USES_IPV4_IPV6_MIGRATION
EOF
%endif

# Include platform include
cat >> $ACE_ROOT/ace/config.h << EOF
#include "ace/config-linux.h"
EOF

# platform_macros.GNU
%if 0%{?suse_version}
cat > $ACE_ROOT/include/makeinclude/platform_macros.GNU <<EOF
CCFLAGS += %optflags
CFLAGS += %optflags
EOF
%endif

cat >> $ACE_ROOT/include/makeinclude/platform_macros.GNU <<EOF
ssl = 1
EOF

%if %{?_with_inline:1}%{!?_with_inline:0}
%define inline -D__ACE_INLINE__ -U__ACE_NO_INLINE__
cat >> $ACE_ROOT/include/makeinclude/platform_macros.GNU <<EOF
inline = 1
EOF
%else
%define inline -D__ACE_NO_INLINE__ -U__ACE_INLINE__
cat >> $ACE_ROOT/include/makeinclude/platform_macros.GNU <<EOF
inline = 0
EOF
%endif

%if %{?_with_xt:1}%{!?_with_xt:0}
cat >> $ACE_ROOT/include/makeinclude/platform_macros.GNU <<EOF
xt = 1
ace_xtreactor = 1
x11 = 1
tao_xtresource = 1
EOF
%endif

%if %{?_with_tk:1}%{!?_with_tk:0}
cat >> $ACE_ROOT/include/makeinclude/platform_macros.GNU <<EOF
ace_tkreactor = 1
tao_tkresource = 1
tk = 1
EOF
%endif

%if %{?_with_fl:1}%{!?_with_fl:0}
cat >> $ACE_ROOT/include/makeinclude/platform_macros.GNU <<EOF
fl = 1
tao_flresource = 1
ace_flreactor = 1
EOF
%endif

%if %{?_with_qt:1}%{!?_with_qt:0}
cat >> $ACE_ROOT/include/makeinclude/platform_macros.GNU <<EOF
qt4 = 1
gl = 1
ace_qt4reactor = 1
tao_qt4resource = 1
EOF
%endif

%if %{?_with_fox:1}%{!?_with_fox:0}
%if 0%{?have_fox} == 1
cat >> $ACE_ROOT/include/makeinclude/platform_macros.GNU <<EOF
fox = 1
ace_foxreactor = 1
tao_foxresource = 1
%endif
%endif

# 64 bit machines need additional macro.
%ifarch x86_64 ia64 ppc64 s390x
cat >> $ACE_ROOT/include/makeinclude/platform_macros.GNU <<EOF
buildbits = 64
EOF
%endif

%ifarch ppc64
cat >> $ACE_ROOT/include/makeinclude/platform_macros.GNU <<EOF
minimaltoc = 1
EOF
%endif

%if %{?_with_opt:0}%{!?_with_opt:1}
cat >> $ACE_ROOT/include/makeinclude/platform_macros.GNU <<EOF
optimize = 0
EOF
%else
cat >> $ACE_ROOT/include/makeinclude/platform_macros.GNU <<EOF
optimize = 1
EOF
%endif

cat >> $ACE_ROOT/include/makeinclude/platform_macros.GNU <<EOF
include \$(ACE_ROOT)/include/makeinclude/platform_linux.GNU
EOF

cat > $ACE_ROOT/bin/MakeProjectCreator/config/default.features <<EOF
ssl=1
EOF

%if %{?_with_bzip2:1}%{!?_with_bzip2:0}
cat >> $ACE_ROOT/bin/MakeProjectCreator/config/default.features <<EOF
bzip2 = 1
EOF
%endif

%if %{?_with_zlib:1}%{!?_with_zlib:0}
cat >> $ACE_ROOT/bin/MakeProjectCreator/config/default.features <<EOF
zlib = 1
EOF
%endif

%if %{?_with_versioned:1}%{!?_with_versioned:0}
cat >> $ACE_ROOT/bin/MakeProjectCreator/config/default.features <<EOF
versioned_namespace = 1
EOF
%endif

# We don't use default.features to enable ipv6 cause it conflicts w/
# the config.h generated version.  Config.h is superior because it is
# shipped to the end-user machines and also defines
# ACE_USES_IPV4_IPV6_MIGRATION which the default.features technique
# does not seem to set.

%if %{?_with_fox:1}%{!?_with_fox:0}
%if 0%{?have_fox} == 1
cat >> $ACE_ROOT/bin/MakeProjectCreator/config/default.features <<EOF
fox=1
EOF
%endif
%endif

# Need to regenerate all of the GNUMakefiles
# then make everything that we have generated for
%if 0%{?_with_tao:1}%{?_without_tao:0}
bin/mwc.pl -type gnuace TAO/TAO_ACE.mwc
make %{?_smp_mflags} -C $TAO_ROOT
%else
bin/mwc.pl -type gnuace ACE.mwc
make %{?_smp_mflags} -C $ACE_ROOT
%endif

%endif

# ================================================================
# install
# ================================================================

%define ACEVERSO %{ACEVER}
%define TAOVERSO %{TAOVER}

%install

export ACE_ROOT=$(pwd)
%if 0%{?_with_tao:1}%{?_without_tao:0}
export TAO_ROOT=$ACE_ROOT/TAO
%endif

# ---------------- Runtime Components ----------------

# install shared libraries
install -d %{buildroot}%{_libdir}

# ACE + XML libraries
INSTLIBS=`ls ${ACE_ROOT}/lib/libACE*.so.%{ACEVERSO}`
install $INSTLIBS %{buildroot}%{_libdir}

# ACE-Kokyu libraries
INSTLIBS=`ls ${ACE_ROOT}/lib/libKokyu.so.%{ACEVERSO}`
install $INSTLIBS %{buildroot}%{_libdir}

%if 0%{?_with_tao:1}%{?_without_tao:0}
# TAO libraries
INSTLIBS=`ls ${ACE_ROOT}/lib/libTAO*.so.%{TAOVERSO}`
install $INSTLIBS %{buildroot}%{_libdir}
%endif

# Create un-versioned symbolic links for libraries
(cd %{buildroot}%{_libdir} && \
 ls *.so.* | awk 'BEGIN{FS="."}{print "ln -sf " $0 " " $1 "." $2;}' | sh)

# install binaries
install -d %{buildroot}%{_sbindir}

# Rename the TAO service binaries:

%if 0%{?_with_tao:1}%{?_without_tao:0}

install ${ACE_ROOT}/TAO/orbsvcs/Naming_Service/tao_cosnaming \
    %{buildroot}%{_sbindir}/tao-cosnaming

install ${ACE_ROOT}/TAO/orbsvcs/CosEvent_Service/tao_cosevent \
    %{buildroot}%{_sbindir}/tao-cosevent

install ${ACE_ROOT}/TAO/orbsvcs/Notify_Service/tao_cosnotification \
    %{buildroot}%{_sbindir}/tao-cosnotification

install ${ACE_ROOT}/TAO/orbsvcs/Trading_Service/tao_costrading \
    %{buildroot}%{_sbindir}/tao-costrading

install ${ACE_ROOT}/TAO/orbsvcs/Event_Service/tao_rtevent \
    %{buildroot}%{_sbindir}/tao-rtevent

install ${ACE_ROOT}/TAO/orbsvcs/Concurrency_Service/tao_cosconcurrency \
    %{buildroot}%{_sbindir}/tao-cosconcurrency

#Create directories
for dir in cache log; do
        mkdir -p %{buildroot}%{_localstatedir}/${dir}/tao
done

# Create data files which will be ghosted.
touch %{buildroot}%{_localstatedir}/cache/tao/tao-cosnaming.dat

# Create data files which will be ghosted.
for logfile in cosnaming cosconcurrency cosevent cosnotification costrading rtevent; do
    touch %{buildroot}%{_localstatedir}/log/tao/tao-${logfile}.log
done

%endif

# ---------------- Development Components ----------------

# INSTHDR="cp --preserve=timestamps"
INSTHDR="install -m 0644 -p"

# install headers
install -d %{buildroot}%{_includedir}
( set +x
echo "Building list of headers..."

# Generate raw dependency output
BASEHDR=`find \
    ace \
    ACEXML/common \
    ACEXML/parser/parser \
    Kokyu \
    -name '*.h' -not -name 'config-*'`
%if 0%{?_with_tao:1}%{?_without_tao:0}
TAO_MM_OPTS="-I TAO -I TAO/orbsvcs -I TAO/orbsvcs/orbsvcs"
BASEHDR="$BASEHDR `find \
    TAO/tao \
    TAO/orbsvcs/orbsvcs \
    -name '*.h' -not -name 'config-*'`"
%endif
for j in $BASEHDR; do
        echo $j >> rawhdrs.log
        echo '#include <'$j'>' | \
        g++ %{inline} \
            -I . \
            -I protocols \
            $TAO_MM_OPTS \
            -x c++ - -MM -MF mmout 2>> rawhdrs.log && cat mmout || true;
done > mmraw.list

%if 0%{?_with_tao:1}%{?_without_tao:0}
# Append IDL headers to the raw list.
find \
    TAO/tao \
    TAO/orbsvcs/orbsvcs \
    -regex '.*\.p?idl$' >> mmraw.list
%endif

# Cleanup dependency output:
#   remove '-:' sequences
#   change all sequences of whitespace into \n
#   remove leading './'
#   cannonicalize up to two levels of '/../../'
#   remove duplicates
cat mmraw.list |\
        sed -e 's/^-://g' -e 's/\\//g' | \
        tr -s [:space:] "\n" | \
        sed -e 's#^./##g' | \
        sed -e 's#/[^/]\+/\.\./#/#g' -e 's#/[^/]\+/\.\./#/#g' | \
        sort -u > allhdrs.list

# Add missing headers.
ls ace/*{.h,.inl,.cpp} >> allhdrs.list
%if 0%{?_with_tao:1}%{?_without_tao:0}
ls TAO/tao/*{.h,.inl,_T.cpp} >> allhdrs.list
ls TAO/tao/*/*{.h,.inl,.cpp} >> allhdrs.list
ls TAO/orbsvcs/orbsvcs/*{.idl,.h,.inl,_T.cpp} >> allhdrs.list
ls TAO/orbsvcs/orbsvcs/*/*{.h,.inl,_T.cpp} >> allhdrs.list
ls TAO/orbsvcs/orbsvcs/ESF/*.cpp >> allhdrs.list
%endif

# Install headers and create header lists
rm -f ace-headers.tmp
rm -f acexml-headers.tmp
rm -f kokyu-headers.tmp
rm -f tao-headers.tmp

for i in `cat allhdrs.list`; do
    case "$i" in
    protocols/ace/*)
        mkdir -p `dirname %{buildroot}%{_includedir}/${i/protocols\/}`
        $INSTHDR $i %{buildroot}%{_includedir}/${i/protocols/}
        echo '%dir %{_includedir}/'`dirname ${i/protocols/}` >> ace-headers.tmp
        echo '%{_includedir}/'${i/protocols/} >> ace-headers.tmp
        ;;
    ace/*)
        mkdir -p `dirname %{buildroot}%{_includedir}/$i`
        $INSTHDR $i %{buildroot}%{_includedir}/$i
        echo '%dir %{_includedir}/'`dirname $i` >> ace-headers.tmp
        echo '%{_includedir}/'$i >> ace-headers.tmp
        ;;
    ACEXML/*)
        mkdir -p `dirname %{buildroot}%{_includedir}/$i`
        $INSTHDR $i %{buildroot}%{_includedir}/$i
        echo '%dir %{_includedir}/'`dirname $i` >> acexml-headers.tmp
        echo '%{_includedir}/'$i >> acexml-headers.tmp
        ;;
    Kokyu/*)
        mkdir -p `dirname %{buildroot}%{_includedir}/$i`
        $INSTHDR $i %{buildroot}%{_includedir}/$i
        echo '%dir %{_includedir}/'`dirname $i` >> kokyu-headers.tmp
        echo '%{_includedir}/'$i >> kokyu-headers.tmp
        ;;
    TAO/tao/*)
        mkdir -p `dirname %{buildroot}%{_includedir}/${i/TAO\/}`
        $INSTHDR $i %{buildroot}%{_includedir}/${i/TAO\/}
        echo '%dir %{_includedir}/'`dirname ${i/TAO\/}` >> tao-headers.tmp
        echo '%{_includedir}/'${i/TAO\/} >> tao-headers.tmp
        ;;
    TAO/orbsvcs/orbsvcs/*)
        mkdir -p `dirname %{buildroot}%{_includedir}/${i/TAO\/orbsvcs\/}`
        $INSTHDR $i %{buildroot}%{_includedir}/${i/TAO\/orbsvcs\/}
        echo '%dir %{_includedir}/'`dirname ${i/TAO\/orbsvcs\/}` >> tao-headers.tmp
        echo '%{_includedir}/'${i/TAO\/orbsvcs\/} >> tao-headers.tmp
        ;;
    *)
        echo $i
        ;;
    esac
done

echo '%defattr(-,root,root,-)' > ace-headers.list
sort -u < ace-headers.tmp >> ace-headers.list
rm -f ace-headers.tmp

echo '%defattr(-,root,root,-)' > acexml-headers.list
sort -u < acexml-headers.tmp >> acexml-headers.list
rm -f acexml-headers.tmp

echo '%defattr(-,root,root,-)' > kokyu-headers.list
sort -u < kokyu-headers.tmp >> kokyu-headers.list
rm -f kokyu-headers.tmp

%if 0%{?_with_tao:1}%{?_without_tao:0}
echo '%defattr(-,root,root,-)' > tao-headers.list
sort -u < tao-headers.tmp >> tao-headers.list
rm -f tao-headers.tmp
%endif

)

# Will also be needed for mpc.
install -d %{buildroot}%{_bindir}

%if 0%{?_with_tao:1}%{?_without_tao:0}

# install the TAO_IDL compiler
install -d %{buildroot}%{_libdir}

install ${ACE_ROOT}/bin/ace_gperf %{buildroot}%{_bindir}
install ${ACE_ROOT}/bin/tao_idl %{buildroot}%{_bindir}
install ${ACE_ROOT}/bin/tao_imr %{buildroot}%{_bindir}
install ${ACE_ROOT}/bin/tao_ifr %{buildroot}%{_bindir}
install ${ACE_ROOT}/TAO/orbsvcs/IFR_Service/tao_ifr_service %{buildroot}%{_bindir}
install ${ACE_ROOT}/bin/tao_catior %{buildroot}%{_bindir}/tao_catior
install ${ACE_ROOT}/bin/tao_nsadd %{buildroot}%{_bindir}/tao_nsadd
install ${ACE_ROOT}/bin/tao_nsdel %{buildroot}%{_bindir}/tao_nsdel
install ${ACE_ROOT}/bin/tao_nslist %{buildroot}%{_bindir}/tao_nslist

# ================================================================
# Config & Options
# ================================================================

install -d %{buildroot}%{_sysconfdir}
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
mkdir -p %{buildroot}%{_sysconfdir}/tao
cp -R ${ACE_ROOT}/rpmbuild/etc/logrotate.d/* %{buildroot}%{_sysconfdir}/logrotate.d/
cp -R ${ACE_ROOT}/rpmbuild/etc/tao/* %{buildroot}%{_sysconfdir}/tao/

%if 0%{?suse_version}
mkdir -p %{buildroot}%{_sysconfdir}/init.d
mkdir -p %{buildroot}%{_localstatedir}/adm
cp -R ${ACE_ROOT}/rpmbuild/ace-tao-init-suse/init.d/* %{buildroot}%{_sysconfdir}/init.d/
cp -R ${ACE_ROOT}/rpmbuild/ace-tao-init-suse/tao/* %{buildroot}%{_sysconfdir}/tao/
%else
mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
cp -R ${ACE_ROOT}/rpmbuild/ace-tao-init-fedora/rc.d/init.d/* %{buildroot}%{_sysconfdir}/rc.d/init.d/
cp -R ${ACE_ROOT}/rpmbuild/ace-tao-init-fedora/tao/* %{buildroot}%{_sysconfdir}/tao/
%endif

%if 0%{?suse_version}
pushd %{buildroot}%{_sysconfdir}/init.d
for f in *; do
        ln -s /etc/init.d/$f %{buildroot}%{_sbindir}/rc${f}
done
popd
%endif
%endif

# ================================================================
# Makefiles
# ================================================================

install -d %{buildroot}%{_datadir}
install -d %{buildroot}%{_datadir}/ace
install -d %{buildroot}%{_datadir}/ace/include
install -d %{buildroot}%{_datadir}/ace/include/makeinclude
install -d %{buildroot}%{_datadir}/mpc
%if 0%{?_with_tao:1}%{?_without_tao:0}
install -d %{buildroot}%{_datadir}/tao
install -d %{buildroot}%{_datadir}/tao/orbsvcs
install -d %{buildroot}%{_datadir}/tao/MPC
%endif

for mk_macros in \
    all_in_one.GNU \
    component_check.GNU \
    macros.GNU \
    platform_g++_common.GNU \
    platform_linux.GNU \
    platform_linux_common.GNU \
    platform_macros.GNU \
    rules.bin.GNU \
    rules.common.GNU \
    rules.lib.GNU \
    rules.local.GNU \
    rules.nested.GNU \
    rules.nolocal.GNU \
    rules.nonested.GNU \
    wrapper_macros.GNU; do (
        install ${ACE_ROOT}/include/makeinclude/$mk_macros %{buildroot}%{_datadir}/ace/include/makeinclude)
done

%if 0%{?_with_tao:1}%{?_without_tao:0}
install ${TAO_ROOT}/rules.tao.GNU %{buildroot}%{_datadir}/tao
%endif

cp -a ${ACE_ROOT}/MPC/* %{buildroot}%{_datadir}/mpc

install -d %{buildroot}%{_datadir}/ace/bin
cp -a ${ACE_ROOT}/bin/DependencyGenerator %{buildroot}%{_datadir}/ace/bin
cp -a ${ACE_ROOT}/bin/MakeProjectCreator %{buildroot}%{_datadir}/ace/bin
install -d %{buildroot}%{_datadir}/ace/bin/PerlACE
cp -a ${ACE_ROOT}/bin/PerlACE/* %{buildroot}%{_datadir}/ace/bin/PerlACE
install ${ACE_ROOT}/bin/mpc.pl %{buildroot}%{_datadir}/ace/bin
install ${ACE_ROOT}/bin/mwc.pl %{buildroot}%{_datadir}/ace/bin
install ${ACE_ROOT}/bin/g++dep %{buildroot}%{_datadir}/ace/bin
install ${ACE_ROOT}/bin/depgen.pl %{buildroot}%{_datadir}/ace/bin
install ${ACE_ROOT}/bin/generate_export_file.pl %{buildroot}%{_datadir}/ace/bin
install ${ACE_ROOT}/bin/add_rel_link.sh %{buildroot}%{_datadir}/ace/bin
install ${ACE_ROOT}/bin/{ACEutils,Uniqueid}.pm %{buildroot}%{_datadir}/ace/bin

ln -sfn %{_includedir}/ace %{buildroot}%{_datadir}/ace
%if 0%{?_with_tao:1}%{?_without_tao:0}
ln -sfn %{_includedir}/tao %{buildroot}%{_datadir}/tao
ln -sfn %{_includedir}/orbsvcs %{buildroot}%{_datadir}/tao/orbsvcs
%endif
ln -sfn %{_libdir} %{buildroot}%{_datadir}/ace/lib

%if 0%{?_with_tao:1}%{?_without_tao:0}
cp -a ${TAO_ROOT}/MPC/* %{buildroot}%{_datadir}/tao/MPC

# Set TAO_IDL setting for the user
cat > %{buildroot}%{_datadir}/ace/include/makeinclude/platform_macros.GNU.tmp <<EOF
TAO_IDL = %{_bindir}/tao_idl
TAO_IDL_DEP = %{_bindir}/tao_idl
EOF
cat %{buildroot}%{_datadir}/ace/include/makeinclude/platform_macros.GNU >> %{buildroot}%{_datadir}/ace/include/makeinclude/platform_macros.GNU.tmp
mv %{buildroot}%{_datadir}/ace/include/makeinclude/platform_macros.GNU.tmp %{buildroot}%{_datadir}/ace/include/makeinclude/platform_macros.GNU
%endif

install -d %{buildroot}%{_sysconfdir}/profile.d
cat > %{buildroot}%{_sysconfdir}/profile.d/mpc.sh <<EOF
MPC_ROOT=/usr/share/mpc
export MPC_ROOT
EOF
cat > %{buildroot}%{_sysconfdir}/profile.d/ace-devel.sh <<EOF
ACE_ROOT=/usr/share/ace
export ACE_ROOT
EOF
%if 0%{?_with_tao:1}%{?_without_tao:0}
cat > %{buildroot}%{_sysconfdir}/profile.d/tao-devel.sh <<EOF
TAO_ROOT=/usr/share/tao
export TAO_ROOT
EOF
%endif

# convenience symlinks
ln -sfn %{_datadir}/ace/bin/mpc.pl %{buildroot}%{_bindir}/mpc.pl
ln -sfn %{_datadir}/ace/bin/mwc.pl %{buildroot}%{_bindir}/mwc.pl

# ================================================================
# Manuals
# ================================================================
install -d %{buildroot}%{_mandir}
install -d %{buildroot}%{_mandir}/man1
install ${ACE_ROOT}/apps/gperf/ace_gperf.1 %{buildroot}%{_mandir}/man1
%if 0%{?_with_tao:1}%{?_without_tao:0}
install ${TAO_ROOT}/TAO_IDL/tao_idl.1 %{buildroot}%{_mandir}/man1
%endif
install -d  %{buildroot}%{_infodir}
install ${ACE_ROOT}/apps/gperf/ace_gperf.info %{buildroot}%{_infodir}

# ================================================================
# Create lists of symlinked so's.  We need two lists because we need
# the unversioned symlinks in the runtime package for so's that can
# be loaded in the svc.conf.
# ================================================================

# Make a list of all shared objects.
(cd %{buildroot}/%{_libdir} && ls *.so | \
        awk '{ print "%{_libdir}/"$1; }' | \
        sort) > all-so.list

# Make a list of likely svc.conf targets.
(cd %{buildroot}/%{_libdir} && ls *.so | \
    nm --print-file-name *.so | \
    grep _make_ | \
    awk 'BEGIN { FS=":"} /^[^:]+:/ { print "%{_libdir}/"$1; }' | \
    sort -u) > rough-svc-so.list

# Remove false positives (IMPORTANT keep this list sorted!)
cat > falsepos-svc-so.list <<EOF
%{_libdir}/libACE.so
%{_libdir}/libTAO.so
EOF
comm -2 -3 rough-svc-so.list falsepos-svc-so.list > svc-so.list

# Find the list of non-sv.conf target files.
comm -2 -3 all-so.list svc-so.list > nonsvc-so.list

# Generate file lists.
grep libACE svc-so.list > ace-svc-so.list
grep libACE nonsvc-so.list > ace-nonsvc-so.list
%if 0%{?_with_tao:1}%{?_without_tao:0}
grep libTAO svc-so.list > tao-svc-so.list
grep libTAO nonsvc-so.list > tao-nonsvc-so.list
%endif

# Concatenate file lists as neccessary
%if 0%{?_with_tao:1}%{?_without_tao:0}
cat tao-headers.list tao-nonsvc-so.list > tao-devel-files.list
%endif
cat ace-headers.list ace-nonsvc-so.list > ace-devel-files.list

# ================================================================
# clean
# ================================================================

%clean
rm -rf %{buildroot}

# ================================================================
# pre install
# ================================================================

%if 0%{?_with_tao:1}%{?_without_tao:0}

# ---------------- tao-cosnaming ----------------

%pre -n tao-cosnaming

getent group tao >/dev/null || /usr/sbin/groupadd -r tao
getent passwd tao >/dev/null || \
/usr/sbin/useradd -r -g tao -d %{_sysconfdir}/tao -s /sbin/nologin \
    -c "TAO Services" tao
exit 0

# ---------------- tao-cosevent ----------------

%pre -n tao-cosevent

getent group tao >/dev/null || /usr/sbin/groupadd -r tao
getent passwd tao >/dev/null || \
/usr/sbin/useradd -r -g tao -d %{_sysconfdir}/tao -s /sbin/nologin \
    -c "TAO Services" tao
exit 0

# ---------------- tao-cosnotification ----------------

%pre -n tao-cosnotification

getent group tao >/dev/null || /usr/sbin/groupadd -r tao
getent passwd tao >/dev/null || \
/usr/sbin/useradd -r -g tao -d %{_sysconfdir}/tao -s /sbin/nologin \
    -c "TAO Services" tao
exit 0

# ---------------- tao-costrading ----------------

%pre -n tao-costrading

getent group tao >/dev/null || /usr/sbin/groupadd -r tao
getent passwd tao >/dev/null || \
/usr/sbin/useradd -r -g tao -d %{_sysconfdir}/tao -s /sbin/nologin \
    -c "TAO Services" tao
exit 0

# ---------------- tao-rtevent ----------------

%pre -n tao-rtevent

getent group tao >/dev/null || /usr/sbin/groupadd -r tao
getent passwd tao >/dev/null || \
/usr/sbin/useradd -r -g tao -d %{_sysconfdir}/tao -s /sbin/nologin \
    -c "TAO Services" tao
exit 0

# ---------------- tao-cosconcurrency ----------------

%pre -n tao-cosconcurrency

getent group tao >/dev/null || /usr/sbin/groupadd -r tao
getent passwd tao >/dev/null || \
/usr/sbin/useradd -r -g tao -d %{_sysconfdir}/tao -s /sbin/nologin \
    -c "TAO Services" tao
exit 0

%endif

# ================================================================
# post install
# ================================================================

# ---------------- ace ----------------

%post -n ace
/sbin/ldconfig

# ---------------- ace-devel ----------------

%post -n ace-devel
/sbin/ldconfig

# ---------------- ace-xml ----------------

%post -n ace-xml
/sbin/ldconfig

# ---------------- ace-gperf ----------------

%post -n ace-gperf

%if 0%{?suse_version}
%install_info --info-dir=%_infodir %_infodir/ace_gperf.info%{_extension}
%else
/sbin/install-info %{_infodir}/ace_gperf.info%{_extension} %{_infodir}/dir
%endif

# ---------------- ace-kokyu ----------------

%post -n ace-kokyu
/sbin/ldconfig

# ---------------- ace-foxreactor ----------------

%if %{?_with_fox:1}%{!?_with_fox:0}
%if 0%{!?suse_version} || 0%{?suse_version} == 1020
%post -n ace-foxreactor
/sbin/ldconfig
%endif
%endif

# ---------------- ace-flreactor ----------------

%if %{?_with_fl:1}%{!?_with_fl:0}
%post -n ace-flreactor
/sbin/ldconfig
%endif

# ---------------- ace-qtreactor ----------------

%if %{?_with_qt:1}%{!?_with_qt:0}
%post -n ace-qtreactor
/sbin/ldconfig
%endif

# ---------------- ace-tkreactor ----------------

%if %{?_with_tk:1}%{!?_with_tk:0}
%post -n ace-tkreactor
/sbin/ldconfig
%endif

# ---------------- ace-xtreactor ----------------

%if %{?_with_xt:1}%{!?_with_xt:0}
%post -n ace-xtreactor
/sbin/ldconfig
%endif

%if 0%{?_with_tao:1}%{?_without_tao:0}

# ---------------- tao ----------------

%post -n tao
/sbin/ldconfig

# ---------------- tao-devel ----------------

%post -n tao-devel
/sbin/ldconfig

# ---------------- tao-utils ----------------

%post -n tao-utils
/sbin/ldconfig

# ---------------- tao-cosnaming ----------------

%post -n tao-cosnaming
%if 0%{?suse_version}
%{fillup_and_insserv tao-cosnaming}
%else
/sbin/chkconfig --add tao-cosnaming
%endif

# ---------------- tao-cosevent ----------------

%post -n tao-cosevent

%if 0%{?suse_version}
%{fillup_and_insserv tao-cosevent}
%else
/sbin/chkconfig --add tao-cosevent
%endif

# ---------------- tao-cosnotification ----------------

%post -n tao-cosnotification

%if 0%{?suse_version}
%{fillup_and_insserv tao-cosnotification}
%else
/sbin/chkconfig --add tao-cosnotification
%endif

# ---------------- tao-costrading ----------------

%post -n tao-costrading

%if 0%{?suse_version}
%{fillup_and_insserv tao-costrading}
%else
/sbin/chkconfig --add tao-costrading
%endif

# ---------------- tao-rtevent ----------------

%post -n tao-rtevent

%if 0%{?suse_version}
%{fillup_and_insserv tao-rtevent}
%else
/sbin/chkconfig --add tao-rtevent
%endif

# ---------------- tao-cosconcurrency ----------------

%post -n tao-cosconcurrency

%if 0%{?suse_version}
%{fillup_and_insserv tao-cosconcurrency}
%else
/sbin/chkconfig --add tao-cosconcurrency
%endif

# ---------------- tao-flresource ----------------

%if %{?_with_fl:1}%{!?_with_fl:0}
%post -n tao-flresource
/sbin/ldconfig
%endif

# ---------------- tao-qtresource ----------------

%if %{?_with_qt:1}%{!?_with_qt:0}
%post -n tao-qtresource
/sbin/ldconfig
%endif

# ---------------- tao-tkresource ----------------

%if %{?_with_tk:1}%{!?_with_tk:0}
%post -n tao-tkresource
/sbin/ldconfig
%endif

# ---------------- tao-xtresource ----------------

%if %{?_with_xt:1}%{!?_with_xt:0}
%post -n tao-xtresource
/sbin/ldconfig
%endif

%endif

# ================================================================
# pre uninstall
# ================================================================

# ---------------- ace-gperf ----------------

%preun -n ace-gperf

if [ $1 = 0 ]; then
    /sbin/install-info --delete %{_infodir}/ace_gperf.info%{_extension} %{_infodir}/dir
fi


%if 0%{?_with_tao:1}%{?_without_tao:0}

# ---------------- tao-cosnaming ----------------

%preun -n tao-cosnaming
%if 0%{?suse_version}
%stop_on_removal tao-cosnaming
%else
if [ $1 = 0 ]; then
    /sbin/service tao-cosnaming stop > /dev/null 2>&1
    /sbin/chkconfig --del tao-cosnaming
fi
%endif

# ---------------- tao-cosevent ----------------

%preun -n tao-cosevent

%if 0%{?suse_version}
%stop_on_removal tao-cosevent
%else
if [ $1 = 0 ]; then
    /sbin/service tao-cosevent stop > /dev/null 2>&1
    /sbin/chkconfig --del tao-cosevent
fi
%endif

# ---------------- tao-cosnotification ----------------

%preun -n tao-cosnotification

%if 0%{?suse_version}
%stop_on_removal tao-cosnotification
%else
if [ $1 = 0 ]; then
    /sbin/service tao-cosnotification stop > /dev/null 2>&1
    /sbin/chkconfig --del tao-cosnotification
fi
%endif

# ---------------- tao-costrading ----------------

%preun -n tao-costrading

%if 0%{?suse_version}
%stop_on_removal tao-costrading
%else
if [ $1 = 0 ]; then
    /sbin/service tao-costrading stop > /dev/null 2>&1
    /sbin/chkconfig --del tao-costrading
fi
%endif

# ---------------- tao-rtevent ----------------

%preun -n tao-rtevent

%if 0%{?suse_version}
%stop_on_removal tao-rtevent
%else
if [ $1 = 0 ]; then
    /sbin/service tao-rtevent stop > /dev/null 2>&1
    /sbin/chkconfig --del tao-rtevent
fi
%endif

# ---------------- tao-cosconcurrency ----------------

%preun -n tao-cosconcurrency

%if 0%{?suse_version}
%stop_on_removal tao-cosconcurrency
%else
if [ $1 = 0 ]; then
    /sbin/service tao-cosconcurrency stop > /dev/null 2>&1
    /sbin/chkconfig --del tao-cosconcurrency
fi
%endif

%endif

# ================================================================
# post uninstall
# ================================================================

# ---------------- ace ----------------

%postun -n ace
/sbin/ldconfig

# ---------------- ace-xml ----------------

%postun -n ace-xml
/sbin/ldconfig

# ---------------- ace-kokyu ----------------

%postun -n ace-kokyu
/sbin/ldconfig

# ---------------- ace-foxreactor ----------------

%if %{?_with_fox:1}%{!?_with_fox:0}
%if 0%{?have_fox} == 1
%postun -n ace-foxreactor
/sbin/ldconfig
%endif
%endif

# ---------------- ace-flreactor ----------------

%if %{?_with_fl:1}%{!?_with_fl:0}
%postun -n ace-flreactor
/sbin/ldconfig
%endif

# ---------------- ace-qtreactor ----------------

%if %{?_with_qt:1}%{!?_with_qt:0}
%postun -n ace-qtreactor
/sbin/ldconfig
%endif

# ---------------- ace-tkreactor ----------------

%if %{?_with_tk:1}%{!?_with_tk:0}
%postun -n ace-tkreactor
/sbin/ldconfig
%endif

# ---------------- ace-xtreactor ----------------

%if %{?_with_xt:1}%{!?_with_xt:0}
%postun -n ace-xtreactor
/sbin/ldconfig
%endif

%if 0%{?_with_tao:1}%{?_without_tao:0}

# ---------------- tao ----------------

%postun -n tao
/sbin/ldconfig

# ---------------- tao-devel ----------------

%postun -n tao-devel
/sbin/ldconfig

# ---------------- tao-utils ----------------

%postun -n tao-utils
/sbin/ldconfig

# ---------------- tao-cosnaming ----------------

%postun -n tao-cosnaming

%if 0%{?suse_version}
%restart_on_update tao-cosnaming
%insserv_cleanup
%else
if [ "$1" -ge "1" ]; then
    /sbin/service tao-cosnaming %{cond_restart} > /dev/null 2>&1
fi
%endif

# ---------------- tao-cosevent ----------------

%postun -n tao-cosevent

%if 0%{?suse_version}
%restart_on_update tao-cosevent
%insserv_cleanup
%else
if [ "$1" -ge "1" ]; then
    /sbin/service tao-cosevent %{cond_restart} > /dev/null 2>&1
fi
%endif

# ---------------- tao-cosnotification ----------------

%postun -n tao-cosnotification

%if 0%{?suse_version}
%restart_on_update tao-cosnotification
%insserv_cleanup
%else
if [ "$1" -ge "1" ]; then
    /sbin/service tao-cosnotification %{cond_restart} > /dev/null 2>&1
fi
%endif

# ---------------- tao-costrading ----------------

%postun -n tao-costrading

%if 0%{?suse_version}
%restart_on_update tao-costrading
%insserv_cleanup
%else
if [ "$1" -ge "1" ]; then
    /sbin/service tao-costrading %{cond_restart} > /dev/null 2>&1
fi
%endif

# ---------------- tao-rtevent ----------------

%postun -n tao-rtevent

%if 0%{?suse_version}
%restart_on_update tao-rtevent
%insserv_cleanup
%else
if [ "$1" -ge "1" ]; then
    /sbin/service tao-rtevent %{cond_restart} > /dev/null 2>&1
fi
%endif

# ---------------- tao-cosconcurrency ----------------

%postun -n tao-cosconcurrency

%if 0%{?suse_version}
%restart_on_update tao-cosconcurrency
%insserv_cleanup
%else
if [ "$1" -ge "1" ]; then
    /sbin/service tao-cosconcurrency %{cond_restart} > /dev/null 2>&1
fi
%endif

# ---------------- tao-flresource ----------------

%if %{?_with_fl:1}%{!?_with_fl:0}
%postun -n tao-flresource
/sbin/ldconfig
%endif

# ---------------- tao-qtresource ----------------

%if %{?_with_qt:1}%{!?_with_qt:0}
%postun -n tao-qtresource
/sbin/ldconfig
%endif

# ---------------- tao-tkresource ----------------

%if %{?_with_tk:1}%{!?_with_tk:0}
%postun -n tao-tkresource
/sbin/ldconfig
%endif

# ---------------- tao-xtresource ----------------

%if %{?_with_xt:1}%{!?_with_xt:0}
%postun -n tao-xtresource
/sbin/ldconfig
%endif

%endif

# ================================================================
# files
# ================================================================

# ---------------- ace ----------------

%files -n ace
%defattr(-,root,root,-)
%{_libdir}/libACE.so.%{ACEVERSO}
%{_libdir}/libACE_ETCL_Parser.so.%{ACEVERSO}
%{_libdir}/libACE_ETCL.so.%{ACEVERSO}
%{_libdir}/libACE_HTBP.so.%{ACEVERSO}
%{_libdir}/libACE_Monitor_Control.so.%{ACEVERSO}
%{_libdir}/libACE_RMCast.so.%{ACEVERSO}
%{_libdir}/libACE_TMCast.so.%{ACEVERSO}
%{_libdir}/libACE_SSL.so.%{ACEVERSO}
%{_libdir}/libACE_INet.so.%{ACEVERSO}
%{_libdir}/libACE_INet_SSL.so.%{ACEVERSO}
%{_libdir}/libACE_Compression.so.%{ACEVERSO}
%{_libdir}/libACE_RLECompression.so.%{ACEVERSO}

%doc AUTHORS
%doc COPYING
%doc PROBLEM-REPORT-FORM
%doc README
%doc VERSION.txt

# ---------------- ace-devel ----------------

%files -n ace-devel -f ace-devel-files.list
%defattr(-,root,root,-)
%{_libdir}/libACE_HTBP.so
%{_libdir}/libACE_SSL.so
%dir %{_datadir}/ace
%{_datadir}/ace/include
%{_datadir}/ace/bin
%{_datadir}/ace/ace
%{_datadir}/ace/lib
%config %{_sysconfdir}/profile.d/ace-devel.sh

%if %{?_with_fox:1}%{!?_with_fox:0}
%exclude %{_includedir}/ace/FoxReactor/FoxReactor.h
%exclude %{_includedir}/ace/FoxReactor/ACE_FoxReactor_export.h
%endif
%if %{?_with_fl:1}%{!?_with_fl:0}
%exclude %{_includedir}/ace/FlReactor/FlReactor.h
%exclude %{_includedir}/ace/FlReactor/ACE_FlReactor_export.h
%endif
%if %{?_with_qt:1}%{!?_with_qt:0}
%exclude %{_includedir}/ace/QtReactor/QtReactor.h
%exclude %{_includedir}/ace/QtReactor/ACE_QtReactor_export.h
%endif
%if %{?_with_tk:1}%{!?_with_tk:0}
%exclude %{_includedir}/ace/TkReactor/TkReactor.h
%exclude %{_includedir}/ace/TkReactor/ACE_TkReactor_export.h
%endif
%if %{?_with_xt:1}%{!?_with_xt:0}
%exclude %{_includedir}/ace/XtReactor/XtReactor.h
%exclude %{_includedir}/ace/XtReactor/ACE_XtReactor_export.h
%endif
%exclude %{_libdir}/libACEXML*.so

%doc ACE-INSTALL.html
%doc AUTHORS
%doc COPYING
%doc PROBLEM-REPORT-FORM
%doc README
%doc VERSION.txt

# ---------------- ace-xml ----------------

%files -n ace-xml
%defattr(-,root,root,-)
%{_libdir}/libACEXML*.so.%{ACEVERSO}

%doc AUTHORS
%doc COPYING
%doc PROBLEM-REPORT-FORM
%doc README
%doc VERSION.txt

# ---------------- ace-gperf ----------------

%files -n ace-gperf
%defattr(-,root,root,-)
%{_bindir}/ace_gperf
%attr(0644,root,root) %{_mandir}/man1/ace_gperf.1%{_extension}
%attr(0644,root,root) %{_infodir}/ace_gperf.info%{_extension}

%doc AUTHORS
%doc COPYING
%doc PROBLEM-REPORT-FORM
%doc README
%doc VERSION.txt

# ---------------- ace-xml-devel ----------------

%files -n ace-xml-devel -f acexml-headers.list
%defattr(-,root,root,-)
%{_libdir}/libACEXML*.so

# These get missed by the automatic list generator because they
# contain no immediate files.
%dir %{_includedir}/ACEXML/parser
%dir %{_includedir}/ACEXML

%doc AUTHORS
%doc COPYING
%doc PROBLEM-REPORT-FORM
%doc README
%doc VERSION.txt

# ---------------- ace-kokyu ----------------

%files -n ace-kokyu
%defattr(-,root,root,-)
%{_libdir}/libKokyu.so.%{ACEVERSO}

%doc AUTHORS
%doc COPYING
%doc PROBLEM-REPORT-FORM
%doc README
%doc VERSION.txt

# ---------------- ace-kokyu-devel ----------------

%files -n ace-kokyu-devel -f kokyu-headers.list
%defattr(-,root,root,-)
%{_libdir}/libKokyu.so

%doc AUTHORS
%doc COPYING
%doc PROBLEM-REPORT-FORM
%doc README
%doc VERSION.txt

# ---------------- ace-foxreactor ----------------

%if 0%{?have_fox} == 1
%if %{?_with_fox:1}%{!?_with_fox:0}
%files -n ace-foxreactor
%defattr(-,root,root,-)
%{_libdir}/libACE_FoxReactor.so.%{ACEVERSO}

%doc AUTHORS
%doc COPYING
%doc PROBLEM-REPORT-FORM
%doc README
%doc VERSION.txt

%endif
%endif
# ---------------- ace-flreactor ----------------

%if %{?_with_fl:1}%{!?_with_fl:0}

%files -n ace-flreactor
%defattr(-,root,root,-)
%{_libdir}/libACE_FlReactor.so.%{ACEVERSO}

%doc AUTHORS
%doc COPYING
%doc PROBLEM-REPORT-FORM
%doc README
%doc VERSION.txt

%endif

# ---------------- ace-flreactor-devel ----------------

%if %{?_with_fl:1}%{!?_with_fl:0}

%files -n ace-flreactor-devel
%defattr(-,root,root,-)
%dir %{_includedir}/ace/FlReactor
%{_libdir}/libACE_FlReactor.so
%{_includedir}/ace/FlReactor/FlReactor.h
%{_includedir}/ace/FlReactor/ACE_FlReactor_export.h

%doc AUTHORS
%doc COPYING
%doc PROBLEM-REPORT-FORM
%doc README
%doc VERSION.txt

%endif

# ---------------- ace-qtreactor ----------------

%if %{?_with_qt:1}%{!?_with_qt:0}

%files -n ace-qtreactor
%defattr(-,root,root,-)
%{_libdir}/libACE_QtReactor.so.%{ACEVERSO}

%doc AUTHORS
%doc COPYING
%doc PROBLEM-REPORT-FORM
%doc README
%doc VERSION.txt

%endif

# ---------------- ace-qtreactor-devel ----------------

%if %{?_with_qt:1}%{!?_with_qt:0}

%files -n ace-qtreactor-devel
%defattr(-,root,root,-)
%{_libdir}/libACE_QtReactor.so
%dir %{_includedir}/ace/QtReactor
%{_includedir}/ace/QtReactor/QtReactor.h
%{_includedir}/ace/QtReactor/ACE_QtReactor_export.h

%doc AUTHORS
%doc COPYING
%doc PROBLEM-REPORT-FORM
%doc README
%doc VERSION.txt

%endif

# ---------------- ace-tkreactor ----------------

%if %{?_with_tk:1}%{!?_with_tk:0}

%files -n ace-tkreactor
%defattr(-,root,root,-)
%{_libdir}/libACE_TkReactor.so.%{ACEVERSO}

%doc AUTHORS
%doc COPYING
%doc PROBLEM-REPORT-FORM
%doc README
%doc VERSION.txt

%endif

# ---------------- ace-tkreactor-devel ----------------

%if %{?_with_tk:1}%{!?_with_tk:0}

%files -n ace-tkreactor-devel
%defattr(-,root,root,-)
%{_libdir}/libACE_TkReactor.so
%dir %{_includedir}/ace/TkReactor
%{_includedir}/ace/TkReactor/TkReactor.h
%{_includedir}/ace/TkReactor/ACE_TkReactor_export.h

%doc AUTHORS
%doc COPYING
%doc PROBLEM-REPORT-FORM
%doc README
%doc VERSION.txt

%endif

# ---------------- ace-xtreactor ----------------

%if %{?_with_xt:1}%{!?_with_xt:0}

%files -n ace-xtreactor
%defattr(-,root,root,-)
%{_libdir}/libACE_XtReactor.so.%{ACEVERSO}

%doc AUTHORS
%doc COPYING
%doc PROBLEM-REPORT-FORM
%doc README
%doc VERSION.txt

%endif

# ---------------- ace-xtreactor-devel ----------------

%if %{?_with_xt:1}%{!?_with_xt:0}

%files -n ace-xtreactor-devel
%defattr(-,root,root,-)
%{_libdir}/libACE_XtReactor.so
%dir %{_includedir}/ace/XtReactor
%{_includedir}/ace/XtReactor/XtReactor.h
%{_includedir}/ace/XtReactor/ACE_XtReactor_export.h

%doc AUTHORS
%doc COPYING
%doc PROBLEM-REPORT-FORM
%doc README
%doc VERSION.txt

%endif

# ---------------- mpc ----------------

%files -n mpc
%defattr(-,root,root,-)
%{_datadir}/mpc
%config %{_sysconfdir}/profile.d/mpc.sh
%{_bindir}/mpc.pl
%{_bindir}/mwc.pl

# ---------------- tao ----------------

%if 0%{?_with_tao:1}%{?_without_tao:0}

# NOTE - Some of the TAO service modules need to be found by dlopen at
# runtime.  Currently this means these specific .so files need to be
# shipped in the runtime package instead of the devel package.

%files -n tao -f tao-svc-so.list
%defattr(-,root,root,-)
%{_datadir}/tao
%exclude %{_datadir}/tao/MPC
%exclude %{_datadir}/tao/tao
%exclude %{_datadir}/tao/orbsvcs

%{_libdir}/libTAO*.so.%{TAOVERSO}

%if %{?_with_fl:1}%{!?_with_fl:0}
%exclude %{_libdir}/libTAO_FlResource.so*
%endif
%if %{?_with_qt:1}%{!?_with_qt:0}
%exclude %{_libdir}/libTAO_QtResource.so*
%endif
%if %{?_with_tk:1}%{!?_with_tk:0}
%exclude %{_libdir}/libTAO_TkResource.so*
%endif
%if %{?_with_xt:1}%{!?_with_xt:0}
%exclude %{_libdir}/libTAO_XtResource.so*
%endif

%doc TAO/COPYING
%doc TAO/PROBLEM-REPORT-FORM
%doc TAO/TAO-INSTALL.html
%doc TAO/VERSION.txt
%doc TAO/README

# ---------------- tao-devel ----------------

# NOTE - Some of the TAO service modules need to be found by dlopen() at
# runtime. Currently this means these specific .so files need to be
# shipped in the runtime package instead of the development package.

%files -n tao-devel -f tao-devel-files.list
%defattr(-,root,root,-)
%config %{_sysconfdir}/profile.d/tao-devel.sh

%{_bindir}/tao_imr
%{_bindir}/tao_ifr
%{_bindir}/tao_ifr_service
%{_datadir}/tao/MPC
%{_bindir}/tao_idl
%attr(0644,root,root) %doc %{_mandir}/man1/tao_idl.1%{_extension}
%{_datadir}/tao/tao
%{_datadir}/tao/orbsvcs

# These get missed by the automatic list generator because they
# contain no immediate files.
%dir %{_includedir}/orbsvcs/FtRtEvent

%if %{?_with_fl:1}%{!?_with_fl:0}
%exclude %{_includedir}/tao/FlResource/FlResource_Factory.h
%exclude %{_includedir}/tao/FlResource/FlResource_Loader.h
%exclude %{_includedir}/tao/FlResource/TAO_FlResource_Export.h
%exclude %{_libdir}/libTAO_FlResource.so
%endif
%if %{?_with_qt:1}%{!?_with_qt:0}
%exclude %{_includedir}/tao/QtResource/QtResource_Factory.h
%exclude %{_includedir}/tao/QtResource/QtResource_Loader.h
%exclude %{_includedir}/tao/QtResource/TAO_QtResource_Export.h
%exclude %{_libdir}/libTAO_QtResource.so
%endif
%if %{?_with_tk:1}%{!?_with_tk:0}
%exclude %{_includedir}/tao/TkResource/TkResource_Factory.h
%exclude %{_includedir}/tao/TkResource/TkResource_Loader.h
%exclude %{_includedir}/tao/TkResource/TAO_TkResource_Export.h
%exclude %{_libdir}/libTAO_TkResource.so
%endif
%if %{?_with_xt:1}%{!?_with_xt:0}
%exclude %{_includedir}/tao/XtResource/XtResource_Factory.h
%exclude %{_includedir}/tao/XtResource/XtResource_Loader.h
%exclude %{_includedir}/tao/XtResource/TAO_XtResource_Export.h
%exclude %{_libdir}/libTAO_XtResource.so
%endif

%doc TAO/COPYING
%doc TAO/PROBLEM-REPORT-FORM
%doc TAO/VERSION.txt
%doc TAO/README

# ---------------- tao-utils ----------------

%files -n tao-utils
%defattr(-,root,root,-)

%{_bindir}/tao_catior
%{_bindir}/tao_nsadd
%{_bindir}/tao_nsdel
%{_bindir}/tao_nslist

%doc TAO/COPYING
%doc TAO/PROBLEM-REPORT-FORM
%doc TAO/VERSION.txt
%doc TAO/README
%doc TAO/utils/catior/README.catior
%doc TAO/utils/nslist/README.nslist

# ---------------- tao-cosnaming ----------------

%files -n tao-cosnaming
%defattr(-,root,root,-)

%dir %{_sysconfdir}/tao

%{_sbindir}/tao-cosnaming

%if 0%{?suse_version}
%{_sysconfdir}/init.d/tao-cosnaming
%{_sbindir}/rctao-cosnaming
%{_sysconfdir}/tao/tao-cosnaming
%else
%{_sysconfdir}/rc.d/init.d/tao-cosnaming
%config(noreplace) %{_sysconfdir}/tao/tao-cosnaming.opt
%endif

%config(noreplace) %{_sysconfdir}/tao/tao-cosnaming.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/tao-cosnaming
%attr(-,tao,tao) %dir %{_localstatedir}/cache/tao
%attr(0644,tao,tao) %ghost %{_localstatedir}/cache/tao/tao-cosnaming.dat
%attr(-,tao,tao) %dir %{_localstatedir}/log/tao
%attr(0644,tao,tao) %ghost %{_localstatedir}/log/tao/tao-cosnaming.log

%doc TAO/COPYING
%doc TAO/PROBLEM-REPORT-FORM
%doc TAO/VERSION.txt
%doc TAO/README

# ---------------- tao-cosevent ----------------

%files -n tao-cosevent
%defattr(-,root,root,-)

%dir %{_sysconfdir}/tao
%{_sbindir}/tao-cosevent

%if 0%{?suse_version}
%{_sysconfdir}/init.d/tao-cosevent
%{_sbindir}/rctao-cosevent
%{_sysconfdir}/tao/tao-cosevent
%else
%{_sysconfdir}/rc.d/init.d/tao-cosevent
%config(noreplace) %{_sysconfdir}/tao/tao-cosevent.opt
%endif

%config(noreplace) %{_sysconfdir}/tao/tao-cosevent.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/tao-cosevent
%attr(-,tao,tao) %dir %{_localstatedir}/log/tao
%attr(0644,tao,tao) %ghost %{_localstatedir}/log/tao/tao-cosevent.log

%doc TAO/COPYING
%doc TAO/PROBLEM-REPORT-FORM
%doc TAO/VERSION.txt
%doc TAO/README

# ---------------- tao-cosnotification ----------------

%files -n tao-cosnotification
%defattr(-,root,root,-)

%{_sbindir}/tao-cosnotification
%dir %{_sysconfdir}/tao

%if 0%{?suse_version}
%{_sysconfdir}/init.d/tao-cosnotification
%{_sbindir}/rctao-cosnotification
%{_sysconfdir}/tao/tao-cosnotification
%else
%{_sysconfdir}/rc.d/init.d/tao-cosnotification
%config(noreplace) %{_sysconfdir}/tao/tao-cosnotification.opt
%endif

%config(noreplace) %{_sysconfdir}/tao/tao-cosnotification.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/tao-cosnotification
%attr(-,tao,tao) %dir %{_localstatedir}/log/tao
%attr(0644,tao,tao) %ghost %{_localstatedir}/log/tao/tao-cosnotification.log

%doc TAO/COPYING
%doc TAO/PROBLEM-REPORT-FORM
%doc TAO/VERSION.txt
%doc TAO/README

# ---------------- tao-costrading ----------------

%files -n tao-costrading
%defattr(-,root,root,-)

%dir %{_sysconfdir}/tao

%{_sbindir}/tao-costrading

%if 0%{?suse_version}
%{_sysconfdir}/init.d/tao-costrading
%{_sbindir}/rctao-costrading
%{_sysconfdir}/tao/tao-costrading
%else
%{_sysconfdir}/rc.d/init.d/tao-costrading
%config(noreplace) %{_sysconfdir}/tao/tao-costrading.opt
%endif

%config(noreplace) %{_sysconfdir}/tao/tao-costrading.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/tao-costrading
%attr(-,tao,tao) %dir %{_localstatedir}/log/tao
%attr(0644,tao,tao) %ghost %{_localstatedir}/log/tao/tao-costrading.log

%doc TAO/COPYING
%doc TAO/PROBLEM-REPORT-FORM
%doc TAO/VERSION.txt
%doc TAO/README

# ---------------- tao-rtevent ----------------

%files -n tao-rtevent
%defattr(-,root,root,-)

%dir %{_sysconfdir}/tao
%{_sbindir}/tao-rtevent

%if 0%{?suse_version}
%{_sysconfdir}/init.d/tao-rtevent
%{_sbindir}/rctao-rtevent
%{_sysconfdir}/tao/tao-rtevent
%else
%{_sysconfdir}/rc.d/init.d/tao-rtevent
%config(noreplace) %{_sysconfdir}/tao/tao-rtevent.opt
%endif

%config(noreplace) %{_sysconfdir}/tao/tao-rtevent.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/tao-rtevent
%attr(-,tao,tao) %dir %{_localstatedir}/log/tao
%attr(0644,tao,tao) %ghost %{_localstatedir}/log/tao/tao-rtevent.log

%doc TAO/COPYING
%doc TAO/PROBLEM-REPORT-FORM
%doc TAO/VERSION.txt
%doc TAO/README

# ---------------- tao-cosconcurrency ----------------

%files -n tao-cosconcurrency
%defattr(-,root,root,-)

%dir %{_sysconfdir}/tao
%{_sbindir}/tao-cosconcurrency

%if 0%{?suse_version}
%{_sysconfdir}/init.d/tao-cosconcurrency
%{_sbindir}/rctao-cosconcurrency
%{_sysconfdir}/tao/tao-cosconcurrency
%else
%{_sysconfdir}/rc.d/init.d/tao-cosconcurrency
%config(noreplace) %{_sysconfdir}/tao/tao-cosconcurrency.opt
%endif

%config(noreplace) %{_sysconfdir}/tao/tao-cosconcurrency.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/tao-cosconcurrency
%attr(-,tao,tao) %dir %{_localstatedir}/log/tao
%attr(0644,tao,tao) %ghost %{_localstatedir}/log/tao/tao-cosconcurrency.log

%doc TAO/COPYING
%doc TAO/PROBLEM-REPORT-FORM
%doc TAO/VERSION.txt
%doc TAO/README

# ---------------- tao-flresource ----------------

%if %{?_with_fl:1}%{!?_with_fl:0}

%files -n tao-flresource
%defattr(-,root,root,-)
%{_libdir}/libTAO_FlResource.so.%{TAOVERSO}

%doc TAO/COPYING
%doc TAO/PROBLEM-REPORT-FORM
%doc TAO/VERSION.txt
%doc TAO/README

%endif

# ---------------- tao-flresource-devel ----------------

%if %{?_with_fl:1}%{!?_with_fl:0}

%files -n tao-flresource-devel
%defattr(-,root,root,-)
%{_libdir}/libTAO_FlResource.so
%dir %{_includedir}/tao
%{_includedir}/tao/FlResource/FlResource_Factory.h
%{_includedir}/tao/FlResource/FlResource_Loader.h
%{_includedir}/tao/FlResource/TAO_FlResource_Export.h

%doc TAO/COPYING
%doc TAO/PROBLEM-REPORT-FORM
%doc TAO/VERSION.txt
%doc TAO/README

%endif

# ---------------- tao-qtresource ----------------

%if %{?_with_qt:1}%{!?_with_qt:0}

%files -n tao-qtresource
%defattr(-,root,root,-)
%{_libdir}/libTAO_QtResource.so.%{TAOVERSO}

%doc TAO/COPYING
%doc TAO/PROBLEM-REPORT-FORM
%doc TAO/VERSION.txt
%doc TAO/README

%endif

# ---------------- tao-qtresource-devel ----------------

%if %{?_with_qt:1}%{!?_with_qt:0}

%files -n tao-qtresource-devel
%defattr(-,root,root,-)
%{_libdir}/libTAO_QtResource.so
%dir %{_includedir}/tao
%{_includedir}/tao/QtResource/QtResource_Factory.h
%{_includedir}/tao/QtResource/QtResource_Loader.h
%{_includedir}/tao/QtResource/TAO_QtResource_Export.h

%doc TAO/COPYING
%doc TAO/PROBLEM-REPORT-FORM
%doc TAO/VERSION.txt
%doc TAO/README

%endif

# ---------------- tao-tkresource ----------------

%if %{?_with_tk:1}%{!?_with_tk:0}

%files -n tao-tkresource
%defattr(-,root,root,-)
%{_libdir}/libTAO_TkResource.so.%{TAOVERSO}

%doc TAO/COPYING
%doc TAO/PROBLEM-REPORT-FORM
%doc TAO/VERSION.txt
%doc TAO/README

%endif

# ---------------- tao-tkresource-devel ----------------

%if %{?_with_tk:1}%{!?_with_tk:0}

%files -n tao-tkresource-devel
%defattr(-,root,root,-)
%{_libdir}/libTAO_TkResource.so
%dir %{_includedir}/tao
%{_includedir}/tao/TkResource/TkResource_Factory.h
%{_includedir}/tao/TkResource/TkResource_Loader.h
%{_includedir}/tao/TkResource/TAO_TkResource_Export.h

%doc TAO/COPYING
%doc TAO/PROBLEM-REPORT-FORM
%doc TAO/VERSION.txt
%doc TAO/README

%endif

# ---------------- tao-xtresource ----------------

%if %{?_with_xt:1}%{!?_with_xt:0}

%files -n tao-xtresource
%defattr(-,root,root,-)
%{_libdir}/libTAO_XtResource.so.%{TAOVERSO}

%doc TAO/COPYING
%doc TAO/PROBLEM-REPORT-FORM
%doc TAO/VERSION.txt
%doc TAO/README

%endif

# ---------------- tao-xtresource-devel ----------------

%if %{?_with_xt:1}%{!?_with_xt:0}

%files -n tao-xtresource-devel
%defattr(-,root,root,-)
%{_libdir}/libTAO_XtResource.so
%dir %{_includedir}/tao
%{_includedir}/tao/XtResource/XtResource_Factory.h
%{_includedir}/tao/XtResource/XtResource_Loader.h
%{_includedir}/tao/XtResource/TAO_XtResource_Export.h

%doc TAO/COPYING
%doc TAO/PROBLEM-REPORT-FORM
%doc TAO/VERSION.txt
%doc TAO/README

%endif

%endif

%changelog
* Fri Jan 31 2014 Steve Huston <shuston@riverace.com> 6.2.5
- Added rpmbuild options "--with tao" and "--without tao"; defaults to 'with'.
  Allows building ACE only (--without tao)

* Thu Aug 11 2011 Thomas Lockhart <lockhart@fourpalms.org> 6.0.3-54
- Parameterize code inlining. Defaults to not inlining which was the previous behavior.
- Implement the rpmbuild options "--with inline" and "--without inline".