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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mageia-dev] bumblebee in mageia (and mentoring)
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20bumblebee%20in%20mageia%20%28and%20mentoring%29&In-Reply-To=%3CCAKVccoXRU0LCCQor2DhtgeCY42k0XyXjBTAbGd9SOzRU9RpVBQ%40mail.gmail.com%3E">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="014102.html">
<LINK REL="Next" HREF="014104.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mageia-dev] bumblebee in mageia (and mentoring)</H1>
<B>simple w8</B>
<A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20bumblebee%20in%20mageia%20%28and%20mentoring%29&In-Reply-To=%3CCAKVccoXRU0LCCQor2DhtgeCY42k0XyXjBTAbGd9SOzRU9RpVBQ%40mail.gmail.com%3E"
TITLE="[Mageia-dev] bumblebee in mageia (and mentoring)">simplew8 at gmail.com
</A><BR>
<I>Tue Apr 10 20:35:26 CEST 2012</I>
<P><UL>
<LI>Previous message: <A HREF="014102.html">[Mageia-dev] bumblebee in mageia (and mentoring)
</A></li>
<LI>Next message: <A HREF="014104.html">[Mageia-dev] bumblebee in mageia (and mentoring)
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#14103">[ date ]</a>
<a href="thread.html#14103">[ thread ]</a>
<a href="subject.html#14103">[ subject ]</a>
<a href="author.html#14103">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>2012/4/10 Anssi Hannula <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">anssi at mageia.org</A>>:
><i> 10.04.2012 07:46, simple w8 kirjoitti:
</I>>><i> Currently i dont have any account to be able to comit these new
</I>>><i> packages for the distro so i ask if someone can review the specs so
</I>>><i> that these packages can start existing in the distro, and i also ask
</I>>><i> if theres someone that can help me with mentoring
</I>><i>
</I>><i> Reviewed below. However, there looks to be quite a lot of work
</I>><i> remaining, so I don't think I'll be able to help you personally with the
</I>><i> issues. I hope you'll find a mentor who'll help you through.
</I>><i>
</I>><i>
</I>>><i> Name:         libbsd
</I>>><i> Summary:      Library providing BSD-compatible functions for portability
</I>>><i>[...]
</I>>><i> %{_libdir}/libbsd.so.%{major}*
</I>><i> [...]
</I>>><i> %{_libdir}/libbsd.so
</I>><i> [...]
</I>><i>
</I>><i> We already have libbsd.a from glibc-devel, which would conflict with
</I>><i> this. If they are really different libraries, something drastic would
</I>><i> have to be done (e.g. renaming or dropping one). I suspect they are the
</I>><i> same, though, in which case this isn't needed.
</I>><i>
</I>>><i> %prep
</I>>><i> %setup -q
</I>>><i> # fix encoding of flopen.3 man page
</I>>><i> for f in src/flopen.3; do
</I>>><i>   iconv -f iso8859-1 -t utf-8 $f >$f.conv
</I>>><i>   touch -r $f $f.conv
</I>>><i>   mv $f.conv $f
</I>>><i> done
</I>>><i>
</I>>><i> %build
</I>>><i> %make
</I>><i>
</I>><i> %optflags not used.
</I>><i>
</I>>><i> %install
</I>>><i> make install DESTDIR=%{buildroot} \
</I>><i>
</I>><i> %makeinstall_std
</I>
Here you really need to spefify them, with %makeinstall_std fails
>><i>     libdir=%{_libdir} \
</I>>><i>     usrlibdir=%{_libdir} \
</I>>><i>     exec_prefix=%{_prefix}
</I>>><i>
</I>><i> [...]
</I>>><i> optidesk.spec
</I>>><i>
</I>>><i>
</I>>><i> Name:           optidesk
</I>>><i> Summary:        Tool to configure .desktop files to run with optirun
</I>>><i> Group:          Graphical desktop/Other
</I>>><i> Version:        0.1
</I>>><i> Release:        1
</I>>><i> URL:            <A HREF="https://github.com/Bumblebee-Project/optidesk">https://github.com/Bumblebee-Project/optidesk</A>
</I>>><i> License:        GPLv3
</I>>><i> # source from git repo <A HREF="git://github.com/Bumblebee-Project/optidesk.git">git://github.com/Bumblebee-Project/optidesk.git</A>
</I>>><i> Source0:      %{name}.tar.xz
</I>><i>
</I>><i> Tarball needs to be versioned.
</I>
I did add a comment saying its from git, but i usually use to create a
macro and put some like this:
Source0: %{?git:%{name}}%{!?git:%{name}-%{version}}.tar.xz
but still there isnt any version released
>><i> Requires:     bumblebee
</I>>><i>
</I>>><i> %description
</I>>><i> This tool is intended to be an easy way of configuring your desired
</I>>><i> applications to be run through Bumblebee. It will allow to create
</I>>><i> and modify a menu entry with an alternative (Optirun) version of the
</I>>><i> default launcher.
</I>>><i>
</I>>><i> %files
</I>>><i> %{_bindir}/%{name}
</I>>><i>
</I>>><i>
</I>>><i> %prep
</I>>><i> %setup -qn %{name}
</I>>><i>
</I>>><i> %build
</I>>><i> autoreconf -fi
</I>>><i> %configure
</I>><i>
</I>><i> %configure2_5x
</I>
I also use to use configure2_5X~but here would not make any
difference, but yes here i didnt put because i missed ateention on
this line
>><i> %make
</I>><i> [...]
</I>>><i> %changelog
</I>>><i> * Mon Mar 19 2012 Simple <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">simplew8 at gmailcom</A>> 3.0-1
</I>>><i> - initial package
</I>><i>
</I>><i> No single-entry changelog needed for imported packages, it will be
</I>><i> created from the import commit message. (applies to all .specs)
</I>
Even so i do add an entry in changelog for my personall reports.
>><i>
</I>>><i> dkms-bbswitch.spec
</I>>><i>
</I>>><i>
</I>>><i> %define oname bbswitch
</I>>><i>
</I>>><i> Name:           dkms-%{oname}
</I>>><i> Summary:        bbswitch - Optimus GPU power switcher
</I>>><i> Group:          System/Kernel and hardware
</I>>><i> Version:        0.4.1
</I>>><i> Release:        %mkrel 1
</I>>><i> License:        GPLv3
</I>>><i> URL:            <A HREF="https://github.com/Bumblebee-Project/bbswitch">https://github.com/Bumblebee-Project/bbswitch</A>
</I>>><i> # source from git repo <A HREF="git://github.com/Bumblebee-Project/bbswitch.git">git://github.com/Bumblebee-Project/bbswitch.git</A>
</I>>><i> Source0:        %{oname}.tar.xz
</I>><i>
</I>><i> Tarball needs to be versioned.
</I>
This is from git and already explained that there was no release
>><i> BuildArch:    noarch
</I>>><i> Requires(post):       dkms
</I>>><i> Requires(preun):dkms
</I>><i>
</I>><i> Needs to require dkms.
</I>
AFAIK dkms its only used in post and preun scriptlets., so why add
another plain require?
>><i>
</I>>><i> %description
</I>>><i> bbswitch is a kernel module which automatically detects the required
</I>>><i> ACPI calls for two kinds of Optimus laptops. It has been verified to
</I>>><i> work with "real" Optimus and "legacy" Optimus laptops (at least, that
</I>>><i> is how I call them).
</I>>><i>
</I>>><i> %files
</I>>><i> %{_usrsrc}/%{oname}-%{version}/*
</I>>><i>
</I>>><i> %post
</I>>><i> set -x
</I>>><i> dkms add -m %{oname} -v %{version} --rpm_safe_upgrade || :
</I>>><i> dkms build -m %{oname} -v %{version} --rpm_safe_upgrade || :
</I>>><i> dkms install -m %{oname} -v %{version} --rpm_safe_upgrade || :
</I>>><i> /sbin/modprobe %{oname} || :
</I>>><i>
</I>>><i> %preun
</I>>><i> dkms remove --binary -m %{oname} -v %{version} --rpm_safe_upgrade --all || :
</I>>><i> /sbin/rmmod %{oname} || :
</I>>><i>
</I>><i>
</I>><i> These scripts are a bit incorrect, see
</I>><i> <A HREF="https://wiki.mageia.org/en/DKMS_packaging_policy">https://wiki.mageia.org/en/DKMS_packaging_policy</A>
</I>><i> (some || : should be replaced with &&)
</I>
Well i dont think its incorrect, bow if mageia prefers to use another
code its a different issue.
>><i> %prep
</I>>><i> %setup -qn %{oname}
</I>>><i> sed -i 's/#MODULE_VERSION#/%{version}/g' dkms/dkms.conf
</I>>><i>
</I>>><i> %install
</I>>><i> rm -rf %{buildroot}
</I>>><i> mkdir -p %{buildroot}%{_usrsrc}/%{oname}-%{version}
</I>>><i> cp *.c %{buildroot}%{_usrsrc}/%{oname}-%{version}
</I>>><i> cp Makefile %{buildroot}%{_usrsrc}/%{oname}-%{version}
</I>>><i> cp dkms/dkms.conf %{buildroot}%{_usrsrc}/%{oname}-%{version}/dkms.conf
</I>>><i>
</I>>><i> %changelog
</I>>><i> * Mon Mar 19 2012 Simple <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">simplew8 at gmail.com</A>> 0.4.1-1
</I>>><i> - initial package
</I>>><i>
</I>>><i>
</I>>><i> bumblebee.spec
</I>>><i>
</I>>><i>
</I>>><i> Name:           bumblebee
</I>>><i> Summary:        Bumblebee - support for NVidia Optimus laptops on Linux!
</I>>><i> Group:          System/Kernel and hardware
</I>>><i> Version:        3.0
</I>>><i> Release:        1
</I>><i>
</I>><i> Missing %mkrel.
</I>
Yes its a typo that escaped me.
>><i> URL:            <A HREF="https://github.com/Bumblebee-Project/bumblebee">https://github.com/Bumblebee-Project/bumblebee</A>
</I>>><i> License:        GPLv3
</I>><i>
</I>><i> Incorrect license, see license policy:
</I>><i> <A HREF="https://wiki.mageia.org/en/Licensing_policy">https://wiki.mageia.org/en/Licensing_policy</A>
</I>><i>
</I>><i> AFAICS should be GPLv3+. I didn't check other packages, they may have
</I>><i> wrong tags as well.
</I>
I need to read it, i didnt knew about it.
>><i> # source from git repo <A HREF="git://github.com/Bumblebee-Project/Bumblebee.git">git://github.com/Bumblebee-Project/Bumblebee.git</A>
</I>>><i> Source0:      Bumblebee.tar.xz
</I>><i>
</I>><i> Needs to be versioned.
</I>><i>
</I>>><i> BuildRequires:        X11-devel
</I>>><i> BuildRequires:        pkgconfig(glib-2.0)
</I>>><i> BuildRequires:        pkgconfig(libbsd)
</I>>><i> BuildRequires:        help2man
</I>>><i> Requires(pre):        update-alternatives
</I>>><i> Requires(post):       systemd-units
</I>>><i> Requires(preun):systemd-units
</I>>><i> Requires(postun):systemd-units
</I>>><i> Requires:     virtualgl
</I>>><i> Requires:     x11-driver-video-nvidia-current
</I>><i>
</I>><i> I thought this worked with nouveau as well?
</I>
Well so far the tests i performed always missed with noveau when
running optirun, Anyway, bumblebee is configured by default to use
nvidia driver.
>><i> Requires:     dkms-bbswitch
</I>>><i> Requires:     dkms-acpi_call
</I>><i>
</I>><i> Packages can't require dkms packages directly, see the aforementioned
</I>><i> DKMS policy (use kmod() instead). Requiring them directly breaks binary
</I>><i> dkms packages.
</I>
This one i didnt knew :)
>><i> %description
</I>>><i> Bumblebee daemon is a rewrite of the original Bumblebee service,
</I>>><i> providing an elegant and stable means of managing Optimus hybrid
</I>>><i> graphics chipsets.
</I>>><i> A primary goal of this project is to not only enable use of the
</I>>><i> discrete GPU for rendering, but also to enable smart power management
</I>>><i> of the dGPU when it's not in use.
</I>>><i>
</I>>><i> %prep
</I>>><i> %setup -qn Bumblebee
</I>>><i>
</I>>><i> %build
</I>>><i> autoreconf -fi
</I>>><i> %configure \
</I>>><i> CONF_DRIVER=nvidia \
</I>>><i> CONF_DRIVER_MODULE_NVIDIA=nvidia-current \
</I>>><i> CONF_LDPATH_NVIDIA=/usr/lib/nvidia-current:/usr/lib64/nvidia-current \
</I>>><i> CONF_MODPATH_NVIDIA=/usr/lib/nvidia-current/xorg,/usr/lib64/nvidia-current/xorg,/usr/lib/xorg/modules,/usr/lib64/xorg/modules,/usr/lib/xorg/extra-modules,/usr/lib64/xorg/extra-modules
</I>><i>
</I>><i> Use %{_libdir}, %ifarch and %{_prefix}/lib. 32-bit builds need only
</I>><i> %{_libdir}, 64-bit builds (%ifarch x86_64) need both %{_libdir} and
</I>><i> %{_prefix}/lib.
</I>><i>
</I>><i>
</I>>><i> %make
</I>>><i>
</I>>><i> %install
</I>>><i> rm -rf %{buildroot}
</I>>><i> %makeinstall_std
</I>>><i>
</I>>><i> install -m644 -D scripts/systemd/bumblebeed.service %{buildroot}%{_sysconfdir}/systemd/system/bumblebeed.service
</I>>><i> install -m644 -D scripts/sysvinit/bumblebeed %{buildroot}%{_initrddir}/%{name}/bumblebeed
</I>>><i>
</I>>><i> %files
</I>>><i> %doc README.markdown doc/RELEASE_NOTES_3_0
</I>>><i> %config(noreplace) %{_sysconfdir}/bash_completion.d/bumblebee
</I>><i>
</I>><i> This shouldn't be %config.
</I>><i>
</I>>><i> %dir %{_sysconfdir}/bumblebee/
</I>>><i> %config(noreplace) %{_sysconfdir}/bumblebee/bumblebee.conf
</I>>><i> %config(noreplace) %{_sysconfdir}/bumblebee/xorg.conf.nouveau
</I>>><i> %config(noreplace) %{_sysconfdir}/bumblebee/xorg.conf.nvidia
</I>>><i> %{_sysconfdir}/systemd/system/bumblebeed.service
</I>>><i> %{_initrddir}/%{name}/
</I>><i>
</I>><i> Extra '/'?
</I>
This one was a typo.
>><i> %{_sbindir}/bumblebeed
</I>>><i> %{_bindir}/optirun
</I>>><i> %{_bindir}/bumblebee-bugreport
</I>>><i> %{_mandir}/man1/bumblebeed.1*
</I>>><i> %{_mandir}/man1/optirun.1*
</I>>><i>
</I>>><i> %pre
</I>>><i> %_pre_groupadd %{name}
</I>>><i> if [ "$1" -eq "1" ];then
</I>>><i>   /usr/sbin/update-alternatives --set gl_conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf
</I>>><i> fi
</I>><i>
</I>><i> Forcibly changing configuration in %pre seems quite bad to me, though I
</I>><i> do not see much better solutions (except making XFdrake aware of
</I>><i> bumblebee, which is quite some work).
</I>
I did asked you about what would be the best option here and you said
that --set would be the best choice.
>><i> %post
</I>>><i> %_post_service bumblebeed
</I>><i> [...]
</I>>><i> if [ $1 -eq 1 ]; then
</I>>><i>   # Initial set
</I>>><i>   # Enable (but don't start) the unit by default
</I>>><i>   /bin/systemctl enable bumblebeed.service
</I>>><i> fi
</I>><i>
</I>><i> I don't think this stuff is needed on Mageia, that is done by default.
</I>
Really? I didnt knew about it, is there any page documenting that?
Im quite curious about how is done :)
>><i> %preun
</I>>><i> %_preun_service bumblebeed
</I>><i> [...]
</I>>><i> if [ $1 -eq 0 ]; then
</I>>><i>   # Package removal, not upgrade
</I>>><i>   /bin/systemctl --no-reload disable bumblebeed.service
</I>>><i>   /bin/systemctl stop bumblebeed.service
</I>>><i> fi
</I>><i>
</I>><i> That is done by %_preun_service already.
</I>
How come?
~]$ rpm -E %_preun_service
/usr/share/rpm-helper/del-service %{name} $1
>><i> %postun
</I>>><i> %_postun_groupdel %{name}
</I>><i>
</I>>><i> /bin/systemctl daemon-reload
</I>><i>
</I>><i> Already done by filetriggers.
</I>><i>
</I>>><i> if [ $1 -ge 1 ]; then
</I>>><i>   # Package upgrade, not uninstall
</I>>><i>   /bin/systemctl try-restart bumblebeed.service
</I>>><i> fi
</I>><i>
</I>><i> Already done by %_post_service.
</I>
I dont get why you said that again when:
]$ rpm -E %_post_service
/usr/share/rpm-helper/add-service %{name} $1
>><i>
</I>>><i> %changelog
</I>>><i> * Mon Mar 19 2012 Simple <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">simplew8 at gmailcom</A>> 3.0-1
</I>>><i> - 3.0 (from git), initial package
</I>>><i>
</I>>><i>
</I>>><i> bumblebee-ui.spec
</I>>><i>
</I>>><i>
</I>>><i> Name:         bumblebee-ui
</I>>><i> Summary:      Bumblebee User Interface
</I>>><i> Group:                System/Configuration/Other
</I>>><i> Version:      1.0
</I>>><i> Release:      %mkrel 1
</I>>><i> URL:          <A HREF="https://github.com/Bumblebee-Project/bumblebee-ui">https://github.com/Bumblebee-Project/bumblebee-ui</A>
</I>>><i> License:      GPLv3
</I>>><i> # source from git repo <A HREF="git://github.com/Bumblebee-Project/bumblebee-ui.git">git://github.com/Bumblebee-Project/bumblebee-ui.git</A>
</I>>><i> Source0:      %{name}.tar.xz
</I>><i>
</I>><i> Needs to be versioned.
</I>><i>
</I>>><i> BuildArch:    noarch
</I>>><i> Requires:     bumblebee
</I>>><i>
</I>>><i> %description
</I>>><i> This is a user interface for bumblebee.
</I>>><i> A complete explanation of the feature of this user interface are
</I>>><i> explained here :
</I>>><i>     <A HREF="https://github.com/Bumblebee-Project/bumblebee-ui/wiki">https://github.com/Bumblebee-Project/bumblebee-ui/wiki</A>
</I>>><i> Please give it a try and report bugs to:
</I>>><i>     <A HREF="https://github.com/Bumblebee-Project/bumblebee-ui/issues">https://github.com/Bumblebee-Project/bumblebee-ui/issues</A>
</I>><i>
</I>><i> "Please give it a try" is inappropriate in a %description. This should
</I>><i> also briefly explain what bumblebee is.
</I>
I just copied whats in the bumblebee page
>><i> %files
</I>>><i> %{_sysconfdir}/xdg/autostart/bumblebee-indicator.desktop
</I>>><i> %{_bindir}/bumblebee*
</I>>><i> %{_datadir}/%{name}/
</I>>><i> %{_datadir}/applications/*
</I>>><i> %{_iconsdir}/hicolor/*
</I>>><i>
</I>>><i> %prep
</I>>><i> %setup -qn %{name}
</I>>><i>
</I>>><i> %install
</I>>><i> rm -rf %{buildroot}
</I>>><i> mkdir -p %{buildroot}%{_iconsdir}/hicolor/48x48/apps/
</I>>><i> cp icons/*.* %{buildroot}%{_iconsdir}/hicolor/48x48/apps/
</I>>><i> mkdir -p %{buildroot}%{_datadir}/{%{name},applications}
</I>>><i> cp app/*.* %{buildroot}%{_datadir}/%{name}
</I>>><i> cp bumblebee-app-settings.desktop %{buildroot}%{_datadir}/applications/
</I>>><i> cp bumblebee-indicator.desktop %{buildroot}%{_datadir}/applications/
</I>>><i> mkdir -p %{buildroot}%{_bindir}
</I>>><i> ln -s %{_datadir}/%{name}/AppSettings.py %{buildroot}%{_bindir}/bumblebee-app-settings
</I>>><i> ln -s %{_datadir}/%{name}/Bumblebee-Indicator.py %{buildroot}%{_bindir}/bumblebee-indicator
</I>>><i>
</I>>><i> chmod +x %{buildroot}%{_datadir}/applications/bumblebee-app-settings.desktop
</I>>><i> chmod +x %{buildroot}%{_datadir}/applications/bumblebee-indicator.desktop
</I>>><i> chmod +x -R %{buildroot}%{_datadir}/%{name}
</I>>><i>
</I>>><i> # Always start in boot
</I>>><i> mkdir -p %{buildroot}%{_sysconfdir}/xdg/autostart
</I>>><i> cp bumblebee-indicator.desktop %{buildroot}%{_sysconfdir}/xdg/autostart
</I>>><i>
</I>>><i>
</I>>><i> %changelog
</I>>><i> * Mon Mar 19 2012 Simple <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">simplew8 at gmail.com</A>> 1.0-1
</I>>><i> - initial package
</I>>><i>
</I>>><i>
</I>>><i> dkms-acpi_call.spec
</I>>><i>
</I>>><i>
</I>>><i> %define modname acpi_call
</I>>><i>
</I>>><i> Name:           dkms-%{modname}
</I>>><i> Summary:        A kernel module that enables you to call ACPI methods
</I>>><i> Group:          System/Kernel and hardware
</I>>><i> Version:        0.1
</I>>><i> Release:        %mkrel 1
</I>>><i> URL:            <A HREF="https://github.com/Bumblebee-Project/acpi_call">https://github.com/Bumblebee-Project/acpi_call</A>
</I>>><i> License:        GPL
</I>>><i> # source from git repo <A HREF="git://github.com/Bumblebee-Project/acpi_call.git">git://github.com/Bumblebee-Project/acpi_call.git</A>
</I>>><i> Source0:      %{modname}.tar.xz
</I>><i>
</I>><i> Needs to be versioned.
</I>><i>
</I>>><i> BuildArch:    noarch
</I>>><i> Requires(post):       dkms
</I>>><i> Requires(preun):dkms
</I>><i>
</I>><i> Needs to require dkms.
</I>
Again i dont get why when dkms is only used in post/preun scripts
>><i>
</I>>><i> %description
</I>>><i> A kernel module that enables you to call ACPI methods by writing the
</I>>><i> method name followed by arguments to /proc/acpi/call.
</I>>><i>
</I>>><i> %files
</I>>><i> %doc README
</I>>><i> %{_usrsrc}/%{modname}-%{version}-%{release}/*
</I>>><i>
</I>>><i> %post
</I>>><i> set -x
</I>>><i> /usr/sbin/dkms add -m %{modname} -v %{version}-%{release} --rpm_safe_upgrade || :
</I>>><i> /usr/sbin/dkms build -m %{modname} -v %{version}-%{release} --rpm_safe_upgrade || :
</I>>><i> /usr/sbin/dkms install -m %{modname} -v %{version}-%{release} --rpm_safe_upgrade || :
</I>>><i> /sbin/modprobe %{modname} || :
</I>><i>
</I>><i> Same comments as for the previous dkms package, see mentioned policy.
</I>><i>
</I>>><i>
</I>>><i> %preun
</I>>><i> dkms remove --binary -m %{modname} -v %{version}-%{release} --rpm_safe_upgrade --all || :
</I>>><i> /sbin/rmmod %{modname} || :
</I>>><i>
</I>>><i> %prep
</I>>><i> %setup -qn %{modname}
</I>>><i>
</I>>><i> %install
</I>>><i> rm -rf %{buildroot}
</I>>><i>
</I>>><i> mkdir -p -m755 %{buildroot}%{_usrsrc}/%{modname}-%{version}-%{release}
</I>>><i> cp -a * %{buildroot}%{_usrsrc}/%{modname}-%{version}-%{release}
</I>>><i> # DKMS config
</I>>><i> cat > %{buildroot}%{_usrsrc}/%{modname}-%{version}-%{release}/dkms.conf << 'EOF'
</I>>><i> PACKAGE_NAME="%{modname}"
</I>>><i> PACKAGE_VERSION="%{version}-%{release}"
</I>>><i> MAKE[0]="make default KERNELPATH=${kernel_source_dir}"
</I>><i>
</I>>><i> MAKE_MATCH[0]="make load KERNELPATH=${kernel_source_dir}"
</I>><i>
</I>><i> MAKE_MATCH[#] is a regular expression field, you have something very
</I>><i> different in there. MAKE_MATCH[#] line is unneeded here.
</I>
That line shouldnt be there, seams i didnt attach the most updated spec...
>><i> BUILT_MODULE_NAME[0]="%{modname}"
</I>>><i> DEST_MODULE_LOCATION[0]="/kernel/drivers/acpi"
</I>>><i> REMAKE_INITRD="no"
</I>>><i> AUTOINSTALL="yes"
</I>>><i> EOF
</I>>><i>
</I>>><i> %changelog
</I>>><i> * Mon Mar 19 2012 Simple <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">simplew8 at gmailcom</A>> 1.0-1
</I>>><i> - initial package
</I>>><i>
</I>>><i>
</I>>><i> libindicator.spec
</I>>><i>
</I>>><i>
</I>>><i> %define major 7
</I>>><i> %define libtool %mklibname indicator3
</I>>><i> %define libname %mklibname indicator3_ %{major}
</I>>><i> %define libdevel %mklibname indicator3 -d
</I>>><i>
</I>>><i> Name:           libindicator
</I>>><i> Summary:        A set of symbols and convience functions for indicators
</I>>><i> Group:          System/Libraries
</I>>><i> Version:        0.4.93
</I>>><i> Release:        %mkrel 1
</I>>><i> License:        GPL-3.0
</I>><i>
</I>><i> Incorrect license tag.
</I>><i>
</I>>><i> URL:            <A HREF="http://launchpad.net/libindicator">http://launchpad.net/libindicator</A>
</I>>><i> Source0:        <A HREF="http://launchpad.net/libindicator/0.5/0.4.93/+download//%{name">http://launchpad.net/libindicator/0.5/0.4.93/+download//%{name</A>}-%{version}.tar.gz
</I>>><i> BuildRequires:  pkgconfig(gtk+-3.0)
</I>>><i>
</I>>><i> %description
</I>>><i> A set of symbols and convience functions that all indicators would like
</I>>><i> to use. Not of real use outside of the Ayatana indicators project.
</I>>><i>
</I>>><i> #--------------------------------------------------------------------
</I>>><i> %package -n %{libname}
</I>>><i> Summary:        libindicator3 library
</I>>><i> Group:          System/Libraries
</I>>><i>
</I>>><i> %description -n %{libname}
</I>>><i> Library for libindicator3.
</I>>><i>
</I>>><i> %files -n %{libname}
</I>>><i> %{_libdir}/libindicator3.so.%{major}*
</I>>><i>
</I>>><i> #--------------------------------------------------------------------
</I>>><i> %package -n %{libtool}-tools
</I>>><i> Summary:        libindicator3 tool
</I>>><i> Group:          System/Libraries
</I>>><i>
</I>>><i> %description -n %{libtool}-tools
</I>>><i> Tool to load libindicator3 plugins.
</I>>><i>
</I>>><i> %files -n %{libtool}-tools
</I>>><i> %{_libdir}/indicator-loader3
</I>>><i> %{_libdir}/libdummy-indicator-blank.so
</I>>><i> %{_libdir}/libdummy-indicator-entry-func.so
</I>>><i> %{_libdir}/libdummy-indicator-null.so
</I>>><i> %{_libdir}/libdummy-indicator-signaler.so
</I>>><i> %{_libdir}/libdummy-indicator-simple.so
</I>>><i> %{_libdir}/libdummy-indicator-visible.so
</I>>><i>
</I>>><i> #--------------------------------------------------------------------
</I>>><i> %package -n %{libdevel}
</I>>><i> Summary:        libindicator3 development files
</I>>><i> Group:          Development/GNOME and GTK+
</I>>><i> Requires:     %{libname} >= %{version}
</I>><i>
</I>><i> Shouldn't this be "="?
</I>
I think >= is better than just =
><i>
</I>>><i>
</I>>><i> %description -n %{libdevel}
</I>>><i> Development files needed by libindicator3.
</I>>><i>
</I>>><i> %files -n %{libdevel}
</I>>><i> %doc AUTHORS ChangeLog COPYING INSTALL
</I>>><i> %{_includedir}/libindicator3-0.4/libindicator/
</I>>><i> %{_libdir}/libindicator3.so
</I>>><i> %{_libdir}/pkgconfig/indicator3-0.4.pc
</I>>><i> %{_datadir}/libindicator/80indicator-debugging
</I>>><i>
</I>>><i> #--------------------------------------------------------------------
</I>>><i> %prep
</I>>><i> %setup -q
</I>>><i>
</I>>><i> %build
</I>>><i> %configure \
</I>>><i>   --disable-static
</I>>><i> %make
</I>>><i>
</I>>><i> %install
</I>>><i> %makeinstall_std
</I>>><i>
</I>>><i> # Clean .la files
</I>>><i> find %{buildroot}%{_libdir} -name '*.la' -delete -print
</I>>><i>
</I>>><i>
</I>>><i> %changelog
</I>>><i> * Sun Mar 18 2012 Simple <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">simplew8 at gmail.com</A>> 0.4.93-1
</I>>><i> - first package
</I>>><i>
</I>>><i>
</I>>><i> virtualgl.spec
</I>>><i>
</I>>><i>
</I>>><i> %define oname VirtualGL
</I>>><i> %define libname %mklibname %{name}
</I>>><i>
</I>>><i> Name:           virtualgl
</I>>><i> Summary:        A toolkit for displaying OpenGL applications to thin clients
</I>>><i> Group:          Networking/Other
</I>>><i> Version:        2.3
</I>>><i> Release:        %mkrel 1
</I>>><i> URL:            <A HREF="http://www.virtualgl.org">http://www.virtualgl.org</A>
</I>>><i> License:        wxWindows Library License v3.1
</I>><i>
</I>><i> Incorrect tag, see license policy as mentioned previously.
</I>><i>
</I>>><i> Source0:      <A HREF="http://prdownloads.sourceforge.net/virtualgl/%{oname">http://prdownloads.sourceforge.net/virtualgl/%{oname</A>}-%{version}.tar.gz
</I>>><i> Patch0:               vgl_2.3_patch0
</I>><i>
</I>><i> Please name this properly, and with a .patch extension.
</I>
Again a typo...
>><i> BuildRequires:        X11-devel
</I>>><i> BuildRequires:        jpeg-devel
</I>>><i> BuildRequires:        cmake
</I>>><i>
</I>>><i>
</I>>><i> %description
</I>>><i> VirtualGL is a library which allows most Linux OpenGL applications to be
</I>>><i> remotely displayed to a thin client without the need to alter the
</I>>><i> applications in any way.  VGL inserts itself into an application at run time
</I>>><i> and intercepts a handful of GLX calls, which it reroutes to the server's
</I>>><i> display (which presumably has a 3D accelerator attached.)  This causes all
</I>>><i> 3D rendering to occur on the server's display.  As each frame is rendered
</I>>><i> by the server, VirtualGL reads back the pixels from the server's framebuffer
</I>>><i> and sends them to the client for re-compositing into the appropriate X
</I>>><i> Window.  VirtualGL can be used to give hardware-accelerated 3D capabilities to
</I>>><i> VNC or other remote display environments that lack GLX support.  In a LAN
</I>>><i> environment, it can also be used with its built-in motion-JPEG video delivery
</I>>><i> system to remotely display full-screen 3D applications at 20+ frames/second.
</I>>><i>
</I>>><i> VirtualGL is based upon ideas presented in various academic papers on
</I>>><i> this topic, including "A Generic Solution for Hardware-Accelerated Remote
</I>>><i> Visualization" (Stegmaier, Magallon, Ertl 2002) and "A Framework for
</I>>><i> Interactive Hardware Accelerated Remote 3D-Visualization" (Engel, Sommer,
</I>>><i> Ertl 2000.)
</I>>><i>
</I>>><i> %files
</I>>><i> %{_bindir}/*
</I>>><i> %{_defaultdocdir}/%{name}/
</I>><i>
</I>><i> Mark docs as %doc.
</I>
Correct, that also missed my attention.
>><i>
</I>>><i> #--------------------------------------------------------------------
</I>>><i> %package -n %libname
</I>>><i> Summary: Libraries injected by VirtualGL into applications that are ran through it
</I>>><i> Group: System/Libraries
</I>>><i>
</I>>><i> %description -n %libname
</I>>><i> Libraries injected by VirtualGL into applications that are ran throught it.
</I>>><i> Lib package allow installing 32 and 64 bits libraries at the same time.
</I>>><i>
</I>>><i> %files -n %libname
</I>>><i> %dir %{_libdir}/fakelib/
</I>>><i> %{_libdir}/fakelib/libGL.so
</I>>><i> %{_libdir}/librrfaker.so
</I>>><i> %{_libdir}/libdlfaker.so
</I>>><i> %{_libdir}/libgefaker.so
</I>><i>
</I>><i> This will need %_provides_exceptions or %_exclude_files_from_autoprov so
</I>><i> that devel(GL) won't be provided. This would confuse the -devel
</I>><i> dependencies of the distribution, and libvirtualgl could sometimes be
</I>><i> installed when libmesagl-devel is intended.
</I>><i>
</I>>><i> #--------------------------------------------------------------------
</I>>><i> %package devel
</I>>><i> Summary:      A toolkit for displaying OpenGL applications to thin clients
</I>>><i> Group:                Networking/Other
</I>>><i> Requires:     %{libname} >= %{version}
</I>><i>
</I>><i> Should be '=' AFAICS.
</I>><i>
</I>>><i> %description devel
</I>>><i> VirtualGL is a library which allows most Linux OpenGL applications to be
</I>>><i> remotely displayed to a thin client without the need to alter the
</I>>><i> applications in any way.  VGL inserts itself into an application at run
</I>>><i> time and intercepts a handful of GLX calls, which it reroutes to the
</I>>><i> server's display (which presumably has a 3D accelerator attached). This
</I>>><i> causes all 3D rendering to occur on the server's display.  As each frame
</I>>><i> is rendered by the server, VirtualGL reads back the pixels from the
</I>>><i> server's framebuffer and sends them to the client for re-compositing into
</I>>><i> the appropriate X Window. VirtualGL can be used to give hardware-
</I>>><i> -accelerated 3D capabilities to VNC or other remote display environments
</I>>><i> that lack GLX support.  In a LAN environment, it can also be used with
</I>>><i> its built-in motion-JPEG video delivery system to remotely display
</I>>><i> full-screen 3D applications at 20+ frames/second.
</I>>><i> VirtualGL is based upon ideas presented in various academic papers on
</I>>><i> this topic, including "A Generic Solution for Hardware-Accelerated Remote
</I>>><i> Visualization" (Stegmaier, Magallon, Ertl 2002) and "A Framework for
</I>>><i> Interactive Hardware Accelerated Remote 3D-Visualization" (Engel, Sommer,
</I>>><i> Ertl 2000.)
</I>>><i>
</I>>><i> %files devel
</I>>><i> %{_includedir}/rrtransport.h
</I>>><i> %{_includedir}/rr.h
</I>>><i>
</I>>><i> #--------------------------------------------------------------------
</I>>><i> %prep
</I>>><i> %setup -qn %{oname}-%{version}
</I>>><i> %patch0 -p1
</I>>><i>
</I>>><i> %build
</I>>><i> cmake -G "Unix Makefiles" \
</I>>><i>     -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \
</I>>><i>     -DCMAKE_INSTALL_PREFIX=%{_prefix} \
</I>>><i>     -DVGL_DOCDIR=%{_defaultdocdir}/%{name} \
</I>>><i>     -DVGL_LIBDIR=%{_libdir} \
</I>>><i>     -DTJPEG_INCLUDE_DIR=%{_includedir} \
</I>>><i>     -DTJPEG_LIBRARY=%{_libdir}/libturbojpeg.so
</I>><i>
</I>><i> Should use %cmake.
</I>
In this case that is not possible, i did tried %cmake but fails.
>><i> %make
</I>>><i>
</I>>><i> %install
</I>>><i> rm -rf %{buildroot}
</I>>><i> %makeinstall_std
</I>>><i>
</I>>><i> rm -rf %{buildroot}%{_prefix}/fakelib
</I>>><i> mkdir -p %{buildroot}%{_libdir}/fakelib
</I>>><i> ln -sf ../librrfaker.so %{buildroot}%{_libdir}/fakelib/libGL.so
</I>>><i> mv -f %{buildroot}%{_bindir}/glxinfo %{buildroot}%{_bindir}/glxinfo2
</I>>><i>
</I>>><i>
</I>>><i> %changelog
</I>>><i> * Mon Mar 19 2012 Simple <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">simplew8 at gmail.com</A>> 2.3-1
</I>>><i> - first package
</I>>><i>
</I>><i>
</I>><i>
</I>><i> --
</I>><i> Anssi Hannula
</I></PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="014102.html">[Mageia-dev] bumblebee in mageia (and mentoring)
</A></li>
<LI>Next message: <A HREF="014104.html">[Mageia-dev] bumblebee in mageia (and mentoring)
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#14103">[ date ]</a>
<a href="thread.html#14103">[ thread ]</a>
<a href="subject.html#14103">[ subject ]</a>
<a href="author.html#14103">[ author ]</a>
</LI>
</UL>
<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-dev">More information about the Mageia-dev
mailing list</a><br>
</body></html>
|