#!perl # Makefile.PL for urpmi # $Id$ use strict; use ExtUtils::MakeMaker; # Command-line parsing. # --without-rpm : don't use rpm to find some paths, and generate make targets # to produce an rpm of this # --install-po : compile .po files and install locale files # also, install localized man pages # --install-gui : install gurpmi my $with_rpm = 1; $with_rpm = 0 if grep $_ eq '--without-rpm', @ARGV; my $with_po = 0; $with_po = 1 if grep $_ eq '--install-po', @ARGV; my $with_gui = 0; $with_gui = 1 if grep $_ eq '--install-gui', @ARGV; # All scripts, some of them go in /usr/sbin (see DESTINSTALLSBIN below) our @bin_scripts = qw(urpmq urpmf rpm-find-leaves urpmi.recover); our @sbin_scripts = qw(urpmi urpme urpmi.addmedia urpmi.update urpmi.removemedia rurpmi rurpme); if ($with_gui) { push @bin_scripts, qw(gurpmi); push @sbin_scripts, qw(gurpmi2); } # And now, add some functionality to MakeMaker. package MY; # Don't install gurpmi.pm if we don't install gui sub libscan { my ($self, $path) = @_; if (!$with_gui && $path =~ /gurpmi/) { return '' } return $path; } # Make proper sbin/man5/man8 dirs in blib sub top_targets { my $inherited = shift->SUPER::top_targets(@_); $inherited =~ s/^config ::/$& \$(INST_MAN5DIR)\$(DIRFILESEP).exists \$(INST_MAN8DIR)\$(DIRFILESEP).exists \$(INST_SBIN)\$(DIRFILESEP).exists/m; $inherited; } # Install sbin_scripts in sbin under blib sub installbin { my $self = shift; my $inherited = $self->SUPER::installbin(@_); my $s = join '|', map quotemeta, @sbin_scripts; $inherited =~ s{\$\(INST_SCRIPT\)/($s)}{\$(INST_SBIN)/$1}g; # how to create needed directories under blib $inherited .= $self->dir_target("\$(INST_$_)") for qw(SBIN MAN5DIR MAN8DIR); $inherited; } sub install { my $inherited = shift->SUPER::install(@_); # Take into account scripts in sbin under blib # and new manpage sections $inherited =~ s/\$\(INST_BIN\) \$\(DESTINSTALL(\w*)BIN\)/$& \$(INST_SBIN) \$(DESTINSTALL$1SBIN) \$(INST_MAN5DIR) \$(DESTINSTALLMAN5DIR) \$(INST_MAN8DIR) \$(DESTINSTALLMAN8DIR)/g; # install files under /etc and /var my $po = $with_po ? ' installpo' : ''; my $gui = $with_gui ? ' installgurpmi2' : ''; $inherited =~ s/^install ::/$& installconfigfiles installstatedir$po$gui/gm; $inherited; } # Due to some hateful layout (that I can't change because the whole stuff is # hosted in CVS (double hate)) I need to add pm_to_blib in the phonic targets. sub special_targets { my $inherited = shift->SUPER::special_targets(@_); $inherited =~ s/PHONY:/$& pm_to_blib/; $inherited; } sub manifypods { my $inherited = shift->SUPER::manifypods(@_); #- TODO repartition of man pages in sections by pod2man is incorrect #- TODO as more languages are added adapt the following quick hack $inherited; } # to generate the ChangeLog depending on the checkout layout my $commonusername = "../common/"; -d $commonusername or do { $commonusername = "../../common/"; -d $commonusername or do { $commonusername = "../../../common/"; -d $commonusername or $commonusername = ""; }; }; # Additional targets sub postamble { <<"**MM**"; .PHONY: installconfigfiles installstatedir ChangeLog TAGS installpo: \$(MAKE) -C po install installconfigfiles: install -d \$(SYSCONFDIR)/urpmi install -m 644 inst.list skip.list \$(SYSCONFDIR)/urpmi installstatedir: install -d \$(LOCALSTATEDIR)/urpmi install -d \$(DESTDIR)/var/cache/urpmi/partial install -d \$(DESTDIR)/var/cache/urpmi/headers install -d \$(DESTDIR)/var/cache/urpmi/rpms installgurpmi2: pure_install ln -s -f consolehelper \$(DESTINSTALLSCRIPT)/gurpmi2 ChangeLog: svn2cl --accum --authors ${commonusername}username.xml rm -f *.bak TAGS: etags *.pm */*.pm testall: make test sudo make test TEST_FILES='t/superuser--*.t' **MM** } # Back to our schedule package main; WriteMakefile( NAME => 'urpmi', PREREQ_PM => { 'Locale::gettext' => '1.01', 'MDV::Packdrakeng' => '1.01', 'URPM' => '1.48', }, VERSION_FROM => 'urpm.pm', macro => { DESTINSTALLSBIN => '$(DESTINSTALLBIN)/../sbin', DESTINSTALLSITESBIN => '$(DESTINSTALLSITEBIN)/../sbin', DESTINSTALLVENDORSBIN => '$(DESTINSTALLVENDORBIN)/../sbin', INSTALLMAN5DIR => '$(PERLPREFIX)/share/man/man5', DESTINSTALLMAN5DIR => '$(DESTDIR)$(INSTALLMAN5DIR)', INSTALLMAN8DIR => '$(PERLPREFIX)/share/man/man8', DESTINSTALLMAN8DIR => '$(DESTDIR)$(INSTALLMAN8DIR)', INST_SBIN => 'blib/sbin', INST_MAN5DIR => 'blib/man5', INST_MAN8DIR => 'blib/man8', # We could read those values from rpm macros. SYSCONFDIR => '$(DESTDIR)/etc', LOCALSTATEDIR => '$(DESTDIR)/var/lib', }, EXE_FILES => [ @bin_scripts, @sbin_scripts ], PMLIBDIRS => [ qw(urpm) ], $with_po ? (DIR => [ 'po' ]) : (), MAN1PODS => { map { my $targ = $_; $targ =~ s{^pod/}{}; $targ =~ s/\.(\d)\.pod$//; my $section = $1 || 1; ( $_ => "\$(INST_MAN${section}DIR)/$targ.$section" ); } , $with_po ? : () }, dist => { COMPRESS => "bzip2", SUFFIX => ".bz2" }, ); td>
blob: ca8cbdf184fc7e0cfa36f362e73b65362c7c04a7 (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
package list_modules;

use MDK::Common;

our @ISA = qw(Exporter);
our @EXPORT = qw(load_dependencies dependencies_closure category2modules module2category sub_categories);

# the categories have 2 purposes
# - choosing modules to include on stage1's (cf update_kernel and mdk-stage1/pci-resource/update-pci-ids.pl)
# - performing a load_category or probe_category (detect_devices.pm and many files in perl-install)

our %l = (
  ################################################################################
  network => 
  {
    atm => [ qw(ambassador eni firestream fore_200e he horizon idt77252 iphase lanai nicstar solos-pci zatm) ],
    main => [
        qw(3c501 3c503 3c505 3c507 3c509 3c515 3c990 3c990fx),
        qw(82596 ac3200 acenic aironet4500_card altera_tse amd8111e at1700 atl2 atp),
        qw(bcm4400 cassini cs89x0 cx82310_eth de600 de620),
        qw(depca dmfe e2100 ec_bhf eepro eexpress enic eth16i),
        qw(ewrk3 fm10k bcmgenet hp hp-plus hp100 i40e i40evf),
        qw(iph5526), #- fibre channel
        qw(i40evf jme lance ne nfp_netvf ni5010 ni52 ni65 nvnet),
        qw(prism2_plx qlge r6040 rcpci rhineget),
        qw(sb1000 sc92031 sh_eth smc-ultra smsc911x smc9194 smsc9420 smsc95xx),
        qw(tc35815 tlan uli526x ),
        qw(b44 com20020-pci de2104x),
        qw(defxx), # most unused
        qw(dgrs e100 eepro100 epic100 fealnx hamachi mlxsw_pci natsemi),
        qw(ne2k-pci pcnet32 plip qede sis900 skfp starfire stmmac-platform tulip),
        qw(typhoon via-rhine winbond-840 xgene-enet forcedeth),
        qw(sungem sunhme), # drivers for ultrasparc, but compiled in ix86 kernels...
      qw(3c59x 8139too 8139cp cpmac niu sundance), #rtl8139
      # add all phys
      qw(amd aquantia at803x bcm7xxx bcm87xx broadcom cicada davicom dp83848 dp83867 et1011c fixed_phy icplus lxt marvell),
      qw(mdio-bcm-unimac mdio-bitbang mdio-cavium mdio-gpio mdio-octeon mdio-thunder micrel microchip),
      qw(national qsemi r8152 r815x realtek smsc spi_ks8995 ste10Xp teranetics vitesse),
    ],
    firewire => [ qw(eth1394 pcilynx) ],
    gigabit => [
      qw(alx atl1 atl1c atl1e at91_ether ax88179_178a be2net bna bnx2 bnx2x bnxt_en cxgb cxgb3 cxgb4 dl2k e1000 e1000e et131x igb ipg ixgb ixgbe lan78xx),
      qw(macb mvmdio myri_sbus myri10ge netxen_nic ns83820 pch_gbe qla3xxx r8169 s2io samsung-sxgbe sfc sxg_nic),
      qw(sis190 sk98lin skge sky2 slicoss spidernet stmmac tehuti tg3 via-velocity vxge yellowfin),
      qw(bcm5820 bcm5700), #- encrypted
    ],

    raw => [
      qw(ppp_generic ppp_async ppp_deflate bsd_comp),
    ],
    pcmcia => [ 
      qw(3c574_cs 3c589_cs axnet_cs fmvj18x_cs),
      qw(ibmtr_cs libertas_cs nmclan_cs pcnet_cs smc91c92_cs),
      qw(xirc2ps_cs xircom_cb xircom_tulip_cb),
    ],
   #- generic NIC detection for USB seems broken (class, subclass, 
   #- protocol reported are not accurate) so we match network adapters against
   #- known drivers :-(
    usb => [ 
      qw(asix catc cdc_ether ch9200 dm9601 huawei_cdc_ncm kaweth mcs7830 pegasus rtl8150 smsc75xx smsc95xx usbnet),
    ],
    wireless => [
      qw(acx-pci acx-usb adm8211 agnx airo airo_cs aironet4500_cs),
      qw(aironet_cs ar5523 ar9170usb arlan arusb_lnx at76c50x_usb ath10k_pci ath5k ath6kl ath6kl_usb ath9k ath9k_htc),
      qw(ath_pci atmel_cs atmel_pci b43 b43legacy bcm43xx bcm_wimax bcma brcm80211 brcmsmac brcmfmac carl9170 com20020_cs),
      qw(dyc_ar5 hostap_cs hostap_pci hostap_plx i2400m_usb ipw2100),
      qw(ipw2200 ipw3945 iwl3945 iwl4965 iwlagn iwldvm iwlmvm iwlwifi madwifi_pci),
      qw(mt7601u mwifiex_usb mwl8k ndiswrapper netwave_cs orinoco orinoco_cs),
      qw(orinoco_nortel orinoco_pci orinoco_plx orinoco_tmd orinoco_usb p54pci),
      qw(p54usb prism2_cs prism2_pci prism2_usb prism54 qmi_wwan r8180),
      qw(r8187se rtl8188ee r8192_pci r8192s_usb r8192u_usb r8712u r8723bs ray_cs rndis_wlan rsi_sdio rt2400 rt2400pci rt2500),
      qw(rt2500pci rt2500usb rt2570 rt2800pci rt2800usb rt2860 rt2860sta rt2870),
      qw(rt3070sta rt61 rt61pci rt73 rt73usb rtl8180 rtl8187 rtl8187se rtl818x_pci r8188eu r8192ee r8723au rtl_pci rtl_usb rtusb),
      qw(rtl8192se rtl8192cu rtl8192de rtl8192ee rtl8723ae rtl8723be rtl8821ae rtl8xxxu spectrum_cs sr9700 sr9800 ssb usb8xxx usbvnet_rfmd vt6655_stage vt6656_stage vt_ar5k w35und),
      qw(wavelan_cs wcn36xx wl wl3501_cs wvlan_cs zd1201 zd1211rw),
    ],
    isdn => [
      qw(avmfritz c4 cdc-acm b1pci divas hfc4s8s_l1 hfc_usb hfc4s8s_l1 hisax hisax_st5481 hisax_fcpcipnp hysdn sedlfax t1pci tpam w6692pci),
      qw(avmfritz hfcpci hfcmulti hfcsusb mISDNinfineon netjet), # mISDN
      qw(fcpci fcdsl fcdsl fcdsl2 fcdslsl fcdslslusb fcdslusb fcdslusba fcusb fcusb2 fxusb fxusb_CZ)
    ],
    cellular => [
      qw(cdc_mbim hso nozomi option sierra),
    ],
    modem => [
      qw(ltmodem mwave sm56 ft1000),
    ],
    slmodem => [
      qw(slamr slusb snd-ali5451 snd-atiixp-modem snd-intel8x0m snd-via82xx-modem),
    ],
    wan => [ qw(c101 cosa cyclomx cycx_drv dlci dscc4 farsync hdlc hostess_sv11 lapbether lmc n2 pc300 pci200syn sbni sdla sdladrv sealevel syncppp wanxl z85230) ],
    usb_dsl => [ qw(cxacru speedtch ueagle-atm usbatm xusbatm) ],
    virtual => [ qw(hv_netvsc vboxdrv virtio_net vmxnet3 xen-netfront) ],
  },

  ################################################################################
  disk => 
  {
    # ide drivers compiled as modules:
    ide => [
        qw(aec62xx alim15x3 amd74xx atiixp cmd64x),
        qw(delkin_cb dtc2278 hpt34x hpt366 ns87415 ht6560b it8172 it8213 it821x jmicron),
        qw(opti621 pdc202xx_new pdc202xx_old piix qd65xx rz1000 sc1200 serverworks siimage sis5513 slc90e66),
        qw(tc86c001 triflex trm290 tx4938ide tx4939ide umc8672 via82cxxx ide-pci-generic ide-generic),
    ],
    scsi => [
	'53c7,8xx',
        qw(a100u2w advansys aha152x aha1542 aha1740 am53c974 atp870u),
        qw(be2iscsi bfa BusLogic dc395x dc395x_trm dmx3191d dtc eata eata_dma),
        qw(eata_pio fdomain g_NCR5380 in2000 initio mpt2sas mpt3sas mvsas NCR53c406a),
        qw(nsp32 pas16 pci2220i pm80xx pm8001 psi240i qla1280 qla2x00 qla2xxx),
        qw(qlogicfas qlogicfc rsxx seagate shasta skd sim710 snic stex sym53c416),
        qw(t128 tmscsim u14-34f ultrastor wd7000 xen-scsiback xen-scsifront),
      qw(aic7xxx aic7xxx_old aic79xx pci2000 qlogicfas408 sym53c8xx wd719x lpfc lpfcdd), # ncr53c8xx
    ],
    sata => [
      # note that ata_piix manage RAID devices on ICH6R
      qw(ahci aic94xx ata_adma ata_piix pata_pdc2027x pdc_adma),
      qw(sata_fsl sata_inic162x sata_mv sata_nv sata_promise),
      qw(sata_qstor sata_rcar sata_sil sata_sil24 sata_sis sata_svw sata_sx4 sata_uli sata_via sata_vsc sx8),
      # new drivers: old ide drivers ported over libata:
      qw(ata_generic mv-ahci pata_ali pata_amd pata_artop pata_atiixp pata_atp867x),
      qw(pata_bf54x pata_cmd640 pata_cmd64x pata_cs5520 pata_cs5530),
      qw(pata_cs5535 pata_cs5536 pata_cypress pata_efar pata_hpt366),
      qw(pata_hpt37x pata_hpt3x2n pata_hpt3x3 pata_isapnp pata_it8172),
      qw(pata_it8213 pata_it821x pata_jmicron pata_legacy pata_marvell),
      qw(pata_mpiix pata_netcell pata_ninja32 pata_ns87410),
      qw(pata_ns87415 pata_oldpiix pata_opti pata_optidma),
      qw(pata_pdc2027x pata_pdc202xx_old pata_piccolo pata_platform pata_qdi),
      qw(pata_radisys pata_rdc pata_rz1000 pata_sc1200 pata_sch),
      qw(pata_serverworks pata_sil680 pata_sis pata_sl82c105),
      qw(pata_triflex pata_via pata_winbond),
      qw(pata_acpi),
    ],
    hardware_raid => [
        # 3w-xxxx drives ATA-RAID, 3w-9xxx and arcmsr drive SATA-RAID
        qw(3w-9xxx 3w-sas 3w-xxxx a320raid aacraid arcmsr cciss cpqarray),
        qw(cpqfc csiostor DAC960 dpt_i2o esas2r gdth hpsa hptiop i2o_block imm ipr ips isci),
        qw(it8212 it821x iteraid megaide megaraid megaraid_mbox),
        qw(megaraid_sas mptfc mptsas mptscsih mptspi pdc-ultra pmcraid ppa),
        qw(qla2100 qla2200 qla2300 qla2322 qla4xxx qla6312 qla6322),
    ],
    virtual => [ qw(hv_storvsc virtio_blk virtio_scsi vmw_pvscsi xenblk xen-blkfront) ],
    pcmcia => [ qw(aha152x_cs fdomain_cs nsp_cs qlogic_cs ide-cs pata_pcmcia sym53c500_cs) ],
    raw => [ qw(ide-gd_mod sd_mod) ],
    usb => [ qw(keucr uas ums-alauda ums-cypress ums-datafab ums-eneub6250 ums-freecom ums-isd200),
	     qw(ums-jumpshot ums-karma ums-onetouch ums-realtek ums-sddr09 ums-sddr55 ums-usbat usb-storage) ],
    firewire => [ qw(sbp2) ],
    cdrom => [ qw(ide-cd_mod sr_mod) ],
    card_reader => [ qw(rts5208 sdhci sdhci-pci tifm_sd tifm_7xx1 toshsd ushc via-sdmmc) ],
  },

  ################################################################################

  bus => 
  {
    usb => [ qw(bcma-hcd c67x00 dwc3 dwc3-pci ehci-hcd ehci-pci ehci-platform ehci-tegra fhci fusbh200-hcd hwa-hc
		imx21-hcd isp116x-hcd isp1362-hcd isp1760 ohci-hcd ohci-pci ohci-platform oxu210hp-hcd
		r8a66597-hcd renesas-usbhs sl811_cs sl811-hcd ssb-hcd u132-hcd
		uhci-hcd usb-ohci usb-uhci vhci-hcd whci-hcd xhci-hcd xhci-pci xhci-plat-hcd) ],
    bluetooth => [ qw(ath3k bcm203x bfusb bluecard_cs bpa10x bt3c_cs btusb dtl1_cs) ],
    firewire => [ qw(ohci1394) ],
    i2c => [
      qw(i2c-ali1535 i2c-ali1563 i2c-ali15x3 i2c-amd756 i2c-amd8111 i2c-i801 i2c-i810 i2c-nforce2),
      qw(i2c-piix4 i2c-prosavage i2c-savage4 i2c-sis5595 i2c-sis630 i2c-sis96x i2c-via i2c-viapro i2c-voodoo3),
      qw(i2c-hydra i2c-ibm_iic i2c-mpc),
    ],
    pcmcia => [
      qw(au1x00_ss i82365 i82092 pd6729 tcic vrc4171_card vrc4173_cardu yenta_socket), # cb_enabler
    ],
    hid => [ qw(ff-memless hid hid-a4tech hid-apple hid-appleir hid-aureal hid-axff hid-belkin hid-betopff
	    hid-cherry hid-chicony hid-cmedia hid-corsair hid-cp2112 hid-cypress hid-dr hid-drff hid-elecom hid-elo hid-emsff
	    hid-ezkey hid-gaff hid-gembird hid-generic hid-gfrm hid-gt683r hid-gyration hid-holtek-kbd hid-holtekff hid-holtek-mouse
	    hid-hyperv hid-icade hid-kensington hid-keytouch hid-kye hid-lcpower hid-lenovo hid-lenovo-tpkbd
	    hid-logitech hid-logitech-dj hid-logitech-hidpp hid-magicmouse hid-microsoft hid-monterey
	    hid-multilaser hid-multitouch hid-ntrig hid-ortek hid-penmount hid-petalynx hid-picolcd
	    hid-pl hid-plantronics hid-primax hid-prodikeys hid-roccat hid-roccat-arvo hid-roccat-common hid-rmi
	    hid-roccat-isku hid-roccat-kone hid-roccat-koneplus hid-roccat-konepure hid-roccat-kovaplus hid-roccat-lua
	    hid-roccat-pyra hid-roccat-ryos hid-roccat-savu hid-saitek hid-samsung hid-sensor-hub hid-sjoy hid-sony
	    hid-speedlink hid-steelseries hid-sunplus hid-tivo hid-thingm hid-tmff hid-topseed hid-twinhan
	    hid-uclogic hid-waltop hid-wiimote hid-xinmo hid-zpff hid-zydacron wacom) ],

   #serial_cs
   #ftl_cs 3c575_cb apa1480_cb epic_cb serial_cb tulip_cb iflash2+_mtd iflash2_mtd
   #cb_enabler
  },

  fs => 
  {
    network => [ qw(af_packet nfs nfsv2 nfsv3 nfsv4 smbfs) ],
    cdrom => [ qw(isofs) ],
    loopback => [ qw(isofs loop squashfs) ],
    local => [
      qw(btrfs ext3 ext4 jfs nilfs2 ntfs reiserfs vfat xfs),
    ],
    various => [ qw(efivarfs overlay romfs ufs fuse) ],

  },