This commit is contained in:
Poyraz76
2015-08-20 18:06:30 +03:00
parent 6965f3d5ac
commit d81be77441
4 changed files with 166 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import cmaketools
from pisi.actionsapi import get
def setup():
pisitools.dosed("CMakeLists.txt", "LIB_SUFFIX 64", deleteLine="True")
cmaketools.configure("-DCMAKE_INSTALL_PREFIX=/usr \
-DPYTHON_EXECUTABLE=/usr/bin/python2.7 \
-DPYTHON_INCLUDE_DIR=/usr/include/python2.7 \
-DPYTHON_LIBRARY=/usr/lib/python2.7 \
-DCMAKE_SKIP_BUILD_RPATH=ON \
-DCMAKE_BUILD_TYPE=Release \
-DEXAMPLES=OFF -DFTDI_EEPROM=OFF")
def build():
autotools.make()
def install():
cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
#Remove python examples
pisitools.removeDir("/usr/share/libftdi")
# Their source can be useful though
pisitools.dodoc("examples/*.c", destDir="%s/examples" % get.srcNAME())
# Install udev rule
pisitools.insinto("/lib/udev/rules.d", "packages/99-libftdi.rules")
pisitools.doman("doc/man/man3/*.3")
pisitools.dodoc("AUTHORS", "COPYING.LIB", "ChangeLog", "LICENSE", "README")
@@ -0,0 +1,8 @@
--- 99-libftdi.rules.orig 2014-02-05 18:24:11.000000000 +0200
+++ packages/99-libftdi.rules 2014-05-25 13:57:47.482994692 +0300
@@ -5,4 +5,4 @@
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0664", GROUP="plugdev"
# FTDI Devices: FT4232HL/Q
-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", MODE="0664", GROUP="plugdev"
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", MODE="0664", GROUP="pnp"
+99
View File
@@ -0,0 +1,99 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>libftdi</Name>
<Homepage>http://www.intra2net.com/en/developer/libftdi/</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>LGPLv2.1</License>
<IsA>library</IsA>
<Summary>A library for accessing to FTDI USB chips</Summary>
<Description>libftdi allows access to eeprom and bitbang modes of FT232/245/2232 USB serial interface chips.</Description>
<Archive sha1sum="f05ade5614aa31e64f91a30ce3782f7ca3704d18" type="tarbz2">http://www.intra2net.com/en/developer/libftdi/download/libftdi1-1.1.tar.bz2</Archive>
<BuildDependencies>
<Dependency>doxygen</Dependency>
</BuildDependencies>
<Patches>
<!-- FIXME: GROUP conversion here (plugdev->pnp) -->
<Patch level="0">fix-udev-group_and_usb_name.patch</Patch>
</Patches>
</Source>
<Package>
<Name>libftdi</Name>
<Files>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="data">/lib/udev/rules.d</Path>
<Path fileType="doc">/usr/share/doc</Path>
</Files>
</Package>
<Package>
<Name>python-libftdi</Name>
<RuntimeDependencies>
<Dependency>python3</Dependency>
<Dependency release="current">libftdi</Dependency>
</RuntimeDependencies>
<Summary>Python bindings for libftdi</Summary>
<Files>
<Path fileType="library">/usr/lib/python*</Path>
</Files>
</Package>
<Package>
<Name>libftdi-devel</Name>
<Summary>Development files for libftdi</Summary>
<RuntimeDependencies>
<Dependency release="current">libftdi</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin/libftdi-config</Path>
<Path fileType="header">/usr/include</Path>
<Path fileType="data">/usr/lib/pkgconfig</Path>
<Path fileType="man">/usr/share/man/man3</Path>
<Path fileType="doc">/usr/share/doc/libftdi/examples</Path>
</Files>
</Package>
<History>
<Update release="5">
<Date>2014-07-05</Date>
<Version>1.1</Version>
<Comment>Version bump.</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
<Update release="4">
<Date>2014-03-10</Date>
<Version>0.20</Version>
<Comment>Rebuild</Comment>
<Name>Varol Maksutoğlu</Name>
<Email>waroi@pisilinux.org</Email>
</Update>
<Update release="3">
<Date>2014-03-09</Date>
<Version>0.20</Version>
<Comment>Rebuild.</Comment>
<Name>Kamil Atlı</Name>
<Email>suvarice@gmail.com</Email>
</Update>
<Update release="2">
<Date>2013-07-30</Date>
<Version>0.20</Version>
<Comment>Rebuild</Comment>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2012-11-16</Date>
<Version>0.20</Version>
<Comment>First release</Comment>
<Name>PisiLinux Community</Name>
<Email>namso-01qhotmail.it</Email>
</Update>
</History>
</PISI>
+18
View File
@@ -0,0 +1,18 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>libftdi</Name>
<Summary xml:lang="tr">FTDI USB entegrelerine erişim kitaplığı</Summary>
<Description xml:lang="tr">libftdi ile FT232/245/2232 USB seri arabirim entegrelerinin eeprom ve bitbang modlarını kullanabilirsiniz.</Description>
</Source>
<Package>
<Name>python-libftdi</Name>
<Summary xml:lang="tr">Python için libftdi bağlayıcıları</Summary>
</Package>
<Package>
<Name>libftdi-devel</Name>
<Summary xml:lang="tr">libftdi için geliştirme dosyaları</Summary>
</Package>
</PISI>