Skip to content

Commit

Permalink
Add RPM packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Gamble committed Jan 31, 2013
1 parent ef127e0 commit 376a4a8
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 2 deletions.
4 changes: 4 additions & 0 deletions MANIFEST.in
@@ -0,0 +1,4 @@
recursive-include src *.h
recursive-include pysrc *
recursive-include bin *
include LICENSE
42 changes: 42 additions & 0 deletions redhat/.svn/entries
@@ -0,0 +1,42 @@
10

dir
0
http://svn.calendarserver.org/repository/calendarserver/PyKerberos/trunk/redhat
http://svn.calendarserver.org/repository/calendarserver
add



















e27351fd-9f3e-4f54-a53b-843176b1656c

kerberos.spec
file



add

makefile
file



add

40 changes: 40 additions & 0 deletions redhat/kerberos.spec
@@ -0,0 +1,40 @@
%define modname kerberos
%define version 1.1.2+DSE1
%define unmangled_version 1.1.2+DSE1
%define release 1
%{!?python: %define python python26}

Summary: Kerberos high-level interface
Name: %{python}-%{modname}
Version: %{version}
Release: %{release}
Source0: %{modname}-%{unmangled_version}.tar.gz
License: ASL 2.0
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
Vendor: UNKNOWN <UNKNOWN>

%description

This Python package is a high-level wrapper for Kerberos (GSSAPI)
operations. The goal is to avoid having to build a module that wraps the
entire Kerberos.framework, and instead offer a limited set of functions
that do what is needed for client/server Kerberos authentication based
on <http://www.ietf.org/rfc/rfc4559.txt>.

%prep
%setup -n %{modname}-%{unmangled_version}

%build
env CFLAGS="$RPM_OPT_FLAGS" %{python} setup.py build

%install
%{python} setup.py install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES

%clean
rm -rf $RPM_BUILD_ROOT

%files -f INSTALLED_FILES
%defattr(-,root,root)
%doc README.txt LICENSE
19 changes: 19 additions & 0 deletions redhat/makefile
@@ -0,0 +1,19 @@
RPMDIR := $(PWD)/redhat
PYTHON := python26
SUBDIRS := BUILD RPMS SOURCES SPECS SRPMS
DIRS := $(foreach subdir,$(SUBDIRS),$(RPMDIR)/$(subdir))

rpm: init
python setup.py sdist -d $(RPMDIR)/SOURCES
rpmbuild --define "_topdir $(RPMDIR)" --define "python $(PYTHON)" -ba $(RPMDIR)/kerberos.spec

init: testdir
mkdir -p $(DIRS)

clean: testdir
rm -rf $(DIRS)

testdir:
ifeq ($(wildcard setup.py),)
$(error Must be run from same directory as setup.py)
endif
5 changes: 3 additions & 2 deletions setup.py
@@ -1,5 +1,5 @@
##
# Copyright (c) 2006-2013 Apple Inc. All rights reserved.
# Copyright (c) 2006-2008 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,9 +28,10 @@

setup (
name = "kerberos",
version = "1.1.1",
version = "1.1.2+DSE1",
description = "Kerberos high-level interface",
long_description=long_description,
license="ASL 2.0",
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 2",
Expand Down

0 comments on commit 376a4a8

Please sign in to comment.