Samples içine logrotate eklendi, pisitools genişliyor
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os, shutil
|
||||
import gzip
|
||||
|
||||
def dodoc(*documentList):
|
||||
|
||||
install_dir = os.getenv('INSTALL_DIR')
|
||||
src_name = os.getenv('SRC_NAME')
|
||||
src_version = os.getenv('SRC_VERSION')
|
||||
@@ -20,4 +22,39 @@ def dodoc(*documentList):
|
||||
if os.access(document, os.F_OK):
|
||||
shutil.copyfile(document, os.path.join(install_dir, \
|
||||
'usr/share/doc/' + srcTag + '/' + os.path.basename(document)))
|
||||
|
||||
|
||||
def dosed(filename, *sedPattern):
|
||||
#FIXME: Convert to python
|
||||
for pattern in sedPattern:
|
||||
os.system('sed -i -e \'' + pattern + '\' ' + filename)
|
||||
|
||||
def dosbin(filename, destination='/usr/sbin'):
|
||||
install_dir = os.getenv('INSTALL_DIR')
|
||||
|
||||
try:
|
||||
os.makedirs(install_dir + destination)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
if os.access(filename, os.F_OK):
|
||||
shutil.copyfile(filename, install_dir + destination + '/' \
|
||||
+ os.path.basename(filename))
|
||||
|
||||
def doman(filename):
|
||||
install_dir = os.getenv('INSTALL_DIR')
|
||||
|
||||
man, postfix = filename.split('.')
|
||||
|
||||
try:
|
||||
os.makedirs(install_dir + '/usr/share/man/man' + postfix)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
gzfile = gzip.GzipFile(filename + '.gz', 'w', 9)
|
||||
gzfile.writelines(file(filename).xreadlines())
|
||||
gzfile.close()
|
||||
|
||||
if os.access(filename, os.F_OK):
|
||||
shutil.copyfile(filename + '.gz', install_dir + '/usr/share/man/man' \
|
||||
+ postfix + '/' + os.path.basename(filename))
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from pisi.actionsapi import autotools
|
||||
from pisi.actionsapi import pisitools
|
||||
import os
|
||||
|
||||
def setup():
|
||||
pisitools.dosed('Makefile', 's:CFLAGS += -g:CFLAGS += -g -mcpu=i686 -O2 -pipe -fomit-frame-pointer:', '/CVSROOT =/d')
|
||||
|
||||
def build():
|
||||
autotools.make()
|
||||
|
||||
def install():
|
||||
pisitools.dosbin('logrotate')
|
||||
pisitools.doman('logrotate.8')
|
||||
@@ -0,0 +1,34 @@
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/files/logrotate.conf,v 1.2 2004/07/18 01:58:24 dragonheart Exp $
|
||||
#
|
||||
# Logrotate default configuration file for Gentoo Linux
|
||||
#
|
||||
# See "man logrotate" for details
|
||||
|
||||
# rotate log files weekly
|
||||
weekly
|
||||
#daily
|
||||
|
||||
# keep 4 weeks worth of backlogs
|
||||
rotate 4
|
||||
|
||||
# create new (empty) log files after rotating old ones
|
||||
create
|
||||
|
||||
# uncomment this if you want your log files compressed
|
||||
compress
|
||||
|
||||
# packages can drop log rotation information into this directory
|
||||
include /etc/logrotate.d
|
||||
|
||||
notifempty
|
||||
nomail
|
||||
noolddir
|
||||
|
||||
# no packages own lastlog or wtmp -- we'll rotate them here
|
||||
/var/log/wtmp {
|
||||
monthly
|
||||
create 0664 root utmp
|
||||
rotate 1
|
||||
}
|
||||
|
||||
# system-specific logs may be also be configured here.
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#! /bin/sh
|
||||
|
||||
/usr/sbin/logrotate /etc/logrotate.conf
|
||||
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
|
||||
<!DOCTYPE PSPEC SYSTEM "http://www.uludag.org.tr/projeler/pisi/pisi-spec.dtd">
|
||||
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>logrotate</Name>
|
||||
<Homepage>http://packages.debian.org/unstable/admin/logrotate.html</Homepage>
|
||||
<Packager>
|
||||
<Name>PACKAGER</Name>
|
||||
<Email>PACKAGER_EMAIL</Email>
|
||||
</Packager>
|
||||
<License>GPL-2</License>
|
||||
<IsA>ISA</IsA>
|
||||
<PartOf>PARTOF</PartOf>
|
||||
<Description>Rotates, compresses, and mails system logs</Description>
|
||||
<Archive archType="targz" sha1sum="84ce324a78ee071536c39e95d3086e53d7fe7ccb">ftp://ftp.linux.org.tr/pub/mirrors/gentoo/distfiles/logrotate_3.6.5.orig.tar.gz</Archive>
|
||||
<BuildDependencies>
|
||||
|
||||
<Dependency>>=sys-apps/portage-2.0.47-r10</Dependency>
|
||||
<Dependency>>=dev-libs/popt-1.5</Dependency>
|
||||
<Dependency>>=sys-apps/sed-4</Dependency>
|
||||
<Dependency>selinux?</Dependency>
|
||||
<Dependency>sys-libs/libselinux</Dependency>
|
||||
<Dependency>!bootstrap?</Dependency>
|
||||
<Dependency>sys-devel/patch</Dependency>
|
||||
<Dependency>userland_GNU?</Dependency>
|
||||
<Dependency>sys-apps/shadow</Dependency>
|
||||
|
||||
</BuildDependencies>
|
||||
<History>
|
||||
<Update>
|
||||
<Date>2005-06-28</Date>
|
||||
<Version>3.6.5</Version>
|
||||
<Release>1</Release>
|
||||
</Update>
|
||||
</History>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>logrotate</Name>
|
||||
<Summary xml:lang="en">Rotates, compresses, and mails system logs</Summary>
|
||||
<RuntimeDependencies>
|
||||
|
||||
<Dependency>>=sys-apps/portage-2.0.47-r10</Dependency>
|
||||
<Dependency>>=dev-libs/popt-1.5</Dependency>
|
||||
<Dependency>>=sys-apps/sed-4</Dependency>
|
||||
<Dependency>selinux?</Dependency>
|
||||
<Dependency>sys-libs/libselinux</Dependency>
|
||||
<Dependency>selinux?</Dependency>
|
||||
<Dependency>sec-policy/selinux-logrotate</Dependency>
|
||||
|
||||
</RuntimeDependencies>
|
||||
<Description>Rotates, compresses, and mails system logs</Description>
|
||||
<Files>
|
||||
<Path fileType="binary">/usr/sbin</Path>
|
||||
<Path fileType="doc">/usr/share/doc</Path>
|
||||
<Path fileType="doc">/usr/share/man</Path>
|
||||
</Files>
|
||||
<History>
|
||||
<Update>
|
||||
<Date>2005-06-28</Date>
|
||||
<Version>3.6.5</Version>
|
||||
<Release>1</Release>
|
||||
</Update>
|
||||
</History>
|
||||
</Package>
|
||||
|
||||
</PISI>
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
all:
|
||||
python main.py
|
||||
PORTDIR=PORTDIR_OVERLAY_KLASÖRÜ sudo python portage2pisi.py
|
||||
PORTDIR=~caglar/svn/paketler/trunk/ sudo python portage2pisi.py
|
||||
clean:
|
||||
sudo rm -rf packages
|
||||
|
||||
Reference in New Issue
Block a user