https://wiki.archlinux.org/api.php?action=feedcontributions&user=Metasyntax&feedformat=atomArchWiki - User contributions [en]2024-03-28T19:41:35ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=OCaml_package_guidelines&diff=152916OCaml package guidelines2011-08-22T03:36:00Z<p>Metasyntax: </p>
<hr />
<div>[[Category:Package development (English)]]<br />
{{i18n|OCaml Package Guidelines}}<br />
<br />
==Package Naming==<br />
For libraries, use {{filename|ocaml-modulename}}. For applications, use the program name. In either case, the pkgname should be entirely lowercase.<br />
<br />
==OCaml Library Locations==<br />
OCaml libraries should be installed under {{filename|/usr/lib/ocaml}}. Libraries were previously installed under {{filename|/usr/lib/ocaml}} or {{filename|/usr/lib/ocaml/site-lib}}, depending on the package. This mixture prevented some packages from working with others and fragmented OCaml development on Arch Linux. The use of {{filename|/usr/lib/ocaml/site-lib}} has therefore been discontinued.<br />
<br />
OCaml libraries should be installed using {{Package Official|ocaml-findlib}}. {{codeline|ocaml-findlib}} includes library metadata in the package that makes it easy to manage libraries. It is a de-facto standard and a lot of OCaml software now requires it.<br />
<br />
{{codeline|ocaml-findlib}} extracts necessary data from a file named {{filename|META}} that should be included in the source archive. If this file is not included, one should either be obtained from the corresponding Debian, Ubuntu, or Fedora package, or created for the package by the maintainer. A request to include the file should also be made to the upstream developers of the package.<br />
<br />
The {{codeline|OCAMLFIND_DESTDIR}} variable should be used when installing packages with {{codeline|ocaml-findlib}}. See the example PKGBUILD below for details.<br />
<br />
==OASIS==<br />
OCaml packages that install executables using OASIS ignore {{codeline|DESTDIR}}. This is a known limitation of OASIS ([https://forge.ocamlcore.org/tracker/?func=detail&atid=294&aid=852&group_id=54 issue #852]). One way to enable {{codeline|DESTDIR}}-like functionality is to run the {{codeline|configure}} script with the {{codeline|--destdir}} argument, like so:<br />
<br />
<pre>build() {<br />
cd "${srcdir}/${srcname}-${pkgver}"<br />
./configure --prefix /usr --destdir "$pkgdir"<br />
<br />
# build commands<br />
}</pre><br />
<br />
== OCaml Bytecode and Levels ==<br />
<br />
OCaml can run code on multiple "levels", the top level interprets OCaml Code without compiling, the bytecode level creates machine independent bytecode and the native level creates machine code binaries (just like C/C++).<br />
<br />
When building OCaml Packages you need to be aware if the build process is compiling native machine code, bytecode, or as in many cases both. This creates a number of situations which can cause problems with package options and the right dependencies.<br />
<br />
If bytecode is produced at all then the PKGBUILD must contain the following to protect the bytecode:<br />
<br />
options=('!strip')<br />
<br />
If the package does not contain bytecode and only distributes a binary, then {{codeline|ocaml}} is not needed as a dependency, but it of course is required as a makedepends since the {{codeline|ocaml}} package provides the OCaml compiler. If the package contains both native code and bytecode then {{codeline|ocaml}} should be a dependency and a makedepends.<br />
<br />
OCaml code is rarely (if ever) distributed as bytecode only and will almost always include native code: the only case where using ''any'' as the ''arch'' is advisable is when only un-compiled source code is distributed, usually with a library, though many libraries still distribute native code.<br />
<br />
The moral of the story here is to be aware of what it is you are distributing, chances are your package contains both native machine code and bytecode.<br />
<br />
== OCaml PKGBUILD Example ==<br />
<br />
<pre><br />
# Contributor: Your Name <youremail@domain.com><br />
<br />
pkgname=ocaml-<package name><br />
pkgver=4.2<br />
pkgrel=1<br />
license=('')<br />
arch=('i686' 'x86_64')<br />
pkgdesc="An OCaml Package"<br />
url=""<br />
depends=('ocaml')<br />
makedepends=('ocaml-findlib')<br />
source=()<br />
options=('!strip')<br />
md5sums=()<br />
<br />
OCAMLFIND_DESTDIR="${pkgdir}$(ocamlfind printconf destdir)"<br />
<br />
build() {<br />
cd "${srcdir}/${pkgname}-${pkgver}"<br />
mkdir -p "$OCAMLFIND_DESTDIR"<br />
./configure --prefix=/usr<br />
make<br />
}<br />
<br />
package() {<br />
cd "${srcdir}/${pkgname}-${pkgver}"<br />
env DESTDIR="${pkgdir}" \<br />
OCAMLFIND_DESTDIR="$OCAMLFIND_DESTDIR" \<br />
make install<br />
}<br />
<br />
</pre><br />
<br />
Keep in mind that many OCaml Packages will often need extra parameters passed to make and make install. Also remember to remove the'' '!strip' ''option and change the architecture if the package does not produce bytecode.</div>Metasyntaxhttps://wiki.archlinux.org/index.php?title=Laptop/Lenovo&diff=140604Laptop/Lenovo2011-05-09T00:36:31Z<p>Metasyntax: /* ThinkPad */ Add T500 to the table.</p>
<hr />
<div>{| style="background-color: #f3f9ff; margin: 1em 2.5% 0 2.5%; padding: 3px 3px; border: 1px solid #aaa;"<br />
|-<br />
|align="center"|'''[[HCL|Hardware Compatibility List]] - [[HCL/Laptops|Laptops main page]]''' <br> [[HCL/Laptops/Acer|Acer]] - [[HCL/Laptops/Apple|Apple]] - [[HCL/Laptops/Asus|Asus]] - [[HCL/Laptops/Compaq|Compaq]] - [[HCL/Laptops/Dell|Dell]] - [[HCL/Laptops/Digital|Digital]] - [[HCL/Laptops/ECS|ECS]] - [[HCL/Laptops/Siemens-Fujitsu|Siemens-Fujitsu]] - [[HCL/Laptops/Gateway|Gateway]] - [[HCL/Laptops/Hitachi|Hitachi]] - [[HCL/Laptops/Higrade|Higrade]] - [[HCL/Laptops/HP|HP]] - [[HCL/Laptops/IBM|IBM/Lenovo]] - [[HCL/Laptops/Medion|Medion]] - [[HCL/Laptops/Micron|Micron]] - [[HCL/Laptops/Mitac|Mitac]] - [[HCL/Laptops/Mitsubishi|Mitsubishi]] - [[HCL/Laptops/NEC|NEC]] - [[HCL/Laptops/Panasonic|Panasonic]] - [[HCL/Laptops/Samsung|Samsung]] - [[HCL/Laptops/Sony|Sony]] - [[HCL/Laptops/Toshiba|Toshiba]] - [[HCL/Laptops/Zenith|Zenith]] - [[HCL/Laptops/Other|Other]]<br />
|}<br />
<br />
<br />
[[Category:Hardware Compatibility List (English)]]<br />
{| align="right" width="300px" style="background-color: #f3f9ff; margin: 1em 2.5% 0 2.5%; padding: 3px; border: 1px solid #aaa;"<br />
| style="background-color:white" | <small>'''[[HCL|Hardware Compatibility List (HCL)]]'''</small><br />
|-<br />
|<small> ''Full Systems'' </small><br />
|-<br />
|<small>[[HCL/Laptops|Laptops]] - [[HCL/Desktops|Desktops]] - [[HCL/Servers|Servers]] - [[HCL/Virtual Machines|Virtual Machines]]</small><br />
|-<br />
|<small>''Components''</small><br />
|-<br />
|<small>[[HCL/Video Cards|Video Cards]] - [[HCL/Sound Cards|Sound Cards]] - [[HCL/Network Adapters (Wired)|Wired Net Adapters]] - [[HCL/Modems|Modems]] - [[HCL/Network Adapters (Wireless)|Wireless Adapters]] - [[HCL/Monitors|Monitors]] - [[HCL/Bluetooth Adapters|Bluetooth Adapters]] - [[HCL/Printers|Printers]] - [[HCL/Scanners|Scanners]] - [[HCL/TV Cards|TV Cards]] - [[HCL/Digital Cameras|Digital Cameras]] - [[HCL/Web Cameras|Web Cameras]] - [[HCL/UPS|UPS]] - [[HCL/Floppy Drives|Floppy Drives]] - [[HCL/CD and DVD Writer/Readers|CD and DVD Writer/Readers]] - [[HCL/SCSI Adapters|SCSI Adapters]] - [[HCL/Gadgets|Gadgets]] - [[HCL/SATA IDE Cards|SATA IDE Cards]] - [[HCL/Keyboards|Keyboards]] - [[HCL/Main Boards|Main Boards]] - [[HCL/RAID Controllers|RAID Controllers]]</small><br />
|}<br />
<br><br><br><br><br />
= IBM/Lenovo =<br />
<br />
== ThinkPad ==<br />
<br />
<br />
{| border="1" cellpadding="2" cellspacing="0"<br />
! rowspan=2 | Model Version:<br />
! colspan=8 | Harware Support:<br />
! rowspan=2 | Remark:<br />
|- <br />
! Video: || Sound: || Ethernet: || Wireless: || Bluetooth: || Power<br>Management:<br> || Modem: || Other:<br />
<br />
|-<br />
| IBM ThinkPad 380ED || NA|| NA || NA || NA || No || NA || NA || NA || <br />
|-<br />
| [[IBM ThinkPad T21]] || Yes* || Yes || Yes || NA || NA || Yes* || NA || NA || See below<br />
|-<br />
| [[IBM ThinkPad T23]] || Yes || Yes || Yes || NA || NA || Yes || NA || NA ||<br />
|-<br />
| [[IBM ThinkPad T42]] || Yes || Yes || Yes || Yes || NA || Yes || NA || NA || <br />
|-<br />
| IBM ThinkPad T60 || Yes || Yes || Yes || Yes || NA || Yes || ? || NA ||<br />
|-<br />
| [[IBM Thinkpad T61]] || Yes || Yes || Yes || Yes* || NA || Yes || NA || ||<br />
|-<br />
| [[IBM Thinkpad T61p]] || Yes || Yes || Yes || Yes || Yes || Yes || NA || ||<br />
|-<br />
| IBM ThinkPad X23 || Yes || Yes || Yes || NA || NA || Yes || NA || NA || <br />
|-<br />
| [[IBM ThinkPad X60s]] || Yes|| Yes || Yes || Yes || Yes || Yes || NA || NA || <br />
|-<br />
| Lenovo Thinkpad X61s || Yes || Yes || Yes || Yes || Yes || Yes || NA || SD slot<br />
|-<br />
| Lenovo ThinkPad R60 || Yes || Yes || Yes || Yes || Yes || Yes || NA || NA || <br />
|-<br />
| Lenovo 3000 N200 || Yes || Yes* || Yes || Yes || Yes || Yes* || NA || NA || See Below<br />
|-<br />
| IBM ThinkPad R50,R52 || Yes || Yes || Yes || Yes || NA || Yes || Yes || Infrared* || <br />
|-<br />
| [[Lenovo ThinkPad X200]] || Yes|| Yes || Yes || Yes || Yes || Yes || NA || NA || <br />
|-<br />
| [[Lenovo IdeaPad S10]] || Yes || Yes || Yes || Yes* || NA || Yes || NA || NA ||<br />
|-<br />
| [[Lenovo ThinkPad T400s]] || Yes || Yes || Yes || Yes || Yes || Yes || NA || NA ||<br />
|-<br />
| [[Lenovo ThinkPad T500]] || Yes || Yes || Yes || Yes || Not Tested || Yes || NA || NA ||<br />
|-<br />
| [[Lenovo Thinkpad Edge E420s]] || Yes || Yes || Yes || Yes || Not Tested || Yes || NA || <br />
|}<br />
<br />
= Special Notes (*): =<br />
<br />
== IBM ThinkPad T21 ==<br />
* Video: <br />
** Incapable of running DRM at 1024x768 and 24-bit color due to 8 MB VRAM. Must drop color or resolution to get DRM.<br />
** For whatever reason, external VGA output (for an external monitor) was disabled. This was fixed by doing this:<br />
*** <code>echo 1 > /proc/acpi/video/VID/DOS</code><br />
<br />
== Lenovo ThinkPad T61 ==<br />
* Wireless:<br />
** While both the iwl3945 and ipw3956 drivers work, the iwl3956 driver provides better transfer speeds, and a working wifi LED activity light.<br />
<br />
== Lenovo 3000 N200 ==<br />
* Sound: <br />
** You may have to append <code>options snd_hda_intel model=lenovo</code> to <code>/etc/modprobe.conf</code> for sound to work.<br />
<br />
== IBM ThinkPad R50,R52 ==<br />
* Infrared: <br />
** Still not tested<br />
== IBM ThinkPad R52 ==<br />
* USB Internet Tethering<br />
** Inbound inet via usb0 works. # dhcpcd usb0<br />
<br />
== Lenovo IdeaPad S10 ==<br />
* Wireless :<br />
**You should install broadcom wl driver. See: http://wiki.archlinux.org/index.php/Broadcom_BCM4312</div>Metasyntaxhttps://wiki.archlinux.org/index.php?title=User:Metasyntax&diff=138974User:Metasyntax2011-04-30T13:54:43Z<p>Metasyntax: My user page</p>
<hr />
<div>I'm a computing scientist from Fort Wayne, Indiana, United States. I hold a Bachelor's of Science in Computer Science from Purdue University. I currently work for Indiana University Purdue University Fort Wayne (IPFW), a local combined Indiana/Purdue school with about 15 000 students. My particular forte is programming languages, of which I know quite a few. I like working with open source projects a lot, that's sort of how I define my success in the world.<br />
<br />
At home I use both Arch Linux and OpenBSD. When I started using Unix in 2004 I learned on Solaris (at Purdue), Slackware, and FreeBSD. After that I used FreeBSD, NetBSD, and OpenBSD for a long time before switching to mostly Ubuntu for ease of usability (although still keeping my website on OpenBSD). In early 2011 I got tired of the direction Ubuntu was going and gave Arch a try. It's awesome to get back to the roots of simplicity that I love, and still have a system that's fully functional and easy to maintain. Seems like the best of all possible worlds.<br />
<br />
{| class="wikitable"<br />
|+Personal Information<br />
|-<br />
|'''Name'''||Taylor Venable<br />
|-<br />
|'''Email'''||taylor@metasyntax.net<br />
|-<br />
|'''IRC'''||metasyntax<br />
|-<br />
|'''Website'''||http://metasyntax.net/<br />
|-<br />
|'''Source'''||[https://bitbucket.org/taylor_venable BitBucket], [https://github.com/metasyntax Github]<br />
|}</div>Metasyntax